I appreciate the insight, but I'm not sure it helps with my situation. This is what I'm trying to accomplish:
1. User selects 1 or more fields from a table using basic "SELECT fields FROM table" syntax, and the result is retrieved using sqlite_get_table (this is still in v2.8x) 2. User calls a function that says "I want to update field 3 in row 10". I have to construct a query that says "UPDATE table SET field3 = value WHERE ROWID = xxxx" I can construct the update statement without much issue, but I need to know whether or not I should put quotes around value, so I need to know whether or not field3 is a text type field. I hope that explains my situation a little better. -- Eric Pankoke Founder / Lead Developer Point Of Light Software http://www.polsoftware.com/ -------------- Original message ---------------------- From: Seth Falcon <[EMAIL PROTECTED]> > [EMAIL PROTECTED] writes: > > > Please forgive me, because I know this has been covered before, but > > at the moment I'm at a loss. I am writing an SQLite wrapper for a > > relatively new language, and one of the requirements is that the > > user be able to add and update date as if they were using an ADO > > recordset. As a result, I need to be able to build an SQL statement > > behind the scenes that is aware of each field's data type. > > I'm not sure I understand what you want. But here are some possible > starting points: > > When using the SQLite C API, you can determine if the columns in a > result set correspond to a database table. In this case, it is > possible to access the table definition and the column types can be > parsed [*1*]. > > If the result columns do not directly correspond to table columns, > then, AFAIK, the best you can do is to use sqlite3_column_type. As > long as you don't have NULLs, this will tell you the affinity type of > the column in the result set. > > Aside: it would be really nice to be able to determine affinity type > from a compiled SQL statement (result of sqlite3_prepare) and not have > to actually _step() to get this info. > > [*1*] See this thread on the SQLite list: > http://marc.theaimsgroup.com/?l=sqlite-users&m=116416179332110&w=2 > > HTH, > > + seth > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------