[Gambas-user] Query failed: ERROR: syntax error at or near "=" at character 40

Rob Kudla sourceforge-raindog2 at ...94...
Mon Nov 28 07:56:09 CET 2005


On Mon November 28 2005 01:30, john hedge wrote:
> I'm very new to all this and I'm copying a code tutorial in
> Linux Format by Dr Mark Bain.

This is actually a database error, rather than a Gambas error.  
I'd have to pull out my copy of Linux Format for this month, but 
it looks to me like Dr Bain forgot to put a space either before 
the "where" or after the "office" in his query string.  I'm not 
even sure why the query is split up into 2 strings joined by 
that ampersand.

sql = "select city from office where manager_id = " & 
resManager!id

(on one line) should create a valid SQL statement, assuming 
manager_id is a numeric field (integer, etc.) in the database.

Rob




More information about the User mailing list