On 13 Sep 2013, at 3:26am, Mun Wai Chan <munwai.c...@globesoftware.com.au> 
wrote:

> I was wondering if there are any software that would dynamically generate SQL 
> statements for SQLite using C#. For example, I would like to be able to do 
> this:
> 
> var sqlStatement = sqlGenerator.Select("Name").From("Customers").ToSQL();
> 
> I only know the names of tables and fields at runtime depending on what the 
> users have selected and the database at the backend is not fixed. I have 
> found some products that can generate SQL statements dynamically but not 
> specifically for SQLite as there are some SQLite specific features that might 
> not be supported.

At their heart, all SQL statements are simply strings.  For example, the above 
use of a strange API looks to me like you should be passing something like

SELECT Name FROM Customers

to the sqlite3_exec() function.  If you have access to the real API and not 
something put around it you can use any technique you like which assemble 
strings.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to