The parsing of the sql statement will fail at the first new line char as this indicates the end of the c-string.
This is the first time I have seen newline characters explicitly embedded in an sql statement. Is there a reason that the newline characters are needed ? Brecht Sanders wrote: > Hi, > I was just testing a program I'm making that uses libdbi. My test was > with an sqlite database. > I came across the following problem: > When a query contains a newline (\n) instead of space on certain > positions dbi_result_get_field_type_idx always returns DBI_TYPE_STRING. > An example of such query: > "SELECT def.*\nFROM def\nLEFT JOIN def_derivation ON > def_derivation.child=def.id\nWHERE def_derivation.parent" > Avoiding newlines and using space instead works around the issue. > However, a newline in an SQL query should be treated as any other > whitespace and the behaviour should not be different. > Regards > Brecht Sanders > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > libdbi-users mailing list > libdbi-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libdbi-users > -- Kris Groves Project Manager / Software Engineer mm-lab GmbH Phone: +49 7154 827 323 Stammheimer Str. 10 Fax: +49 7154 827 350 D-70806 Kornwestheim [EMAIL PROTECTED] www.mmlab.de Domicile of Company: Kornwestheim, Germany District Court - Court of Registration Stuttgart HRB 207257 Managing Directors: Bernd Herrmann, Lothar Krank, Michael Meiser, Dr. Andreas Streit ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users