odbc error

Steve Holden steve at holdenweb.com
Wed Sep 29 14:26:25 CEST 2004


Michele Petrazzo wrote:

> I'm using odbc on win95 and I have an incomprehensible error after a query:
> 
> INSERT INTO test VALUES (f1,f2,f3) VALUES ("t1", "t2", "")
> 
> table test and fields f1,f2,f3 exists :) and I can write to this table.
> 
> The error is :
> [Microsoft][Driver ODBC dBase] Too few parameters. Expected 2.
> 
> What can I do?
> 
The easiest thing to do is use correct syntax, which should put single 
quotes around string literals. The ODBC drivers tend to use standard SQL 
syntax even when the underlying database is a bit more liberal. Try

INSERT INTO test VALUES (f1,f2,f3) VALUES ('t1', 't2', '')

and see if that works.

regards
  Steve



More information about the Python-list mailing list