Re: [q-lang-users] ODBC connection with MS Access
Brought to you by:
agraef
From: Tim H. <q...@st...> - 2008-02-14 14:23:40
|
Albert Graef <Dr....@t-...> writes: > Tim Haynes wrote: >> SQLGetInfo(SQL_IDENTIFIER_QUOTE_CHAR) is your friend: > > Tim, that was very helpful, thanks a lot. I added a new odbc_getinfo > function to the odbc module which provides a direct wrapper of > SQLGetInfo(), so that I can now query all metadata. Fixing odbc_examp.q > so that it works with different RDBMS should be a piece of cake now! Cool. The other thing you might find useful is exposing SQLGetTypeInfo() - at least so that folks can see the native type-names for use in create/alter statements. (Does varchar need a max-size? Float or Double? text or long varchar? As for date/time/datetime/timestamp, don't get me started :) > While I'm giving the odbc module a facelift... I'd also like to support > user-defined functions written in Q (the sqlite3 interface already > provides these and I find them pretty useful). By any chance, do you know > whether ODBC provides an API for this kind of stuff? I'm looking for an > ODBC function which would allow to register a C callback as a UDF to be > called from SQL queries, which takes some SQL values as parameters and > returns another SQL value as the result. Googling around didn't turn up > anything useful so far. I'm not aware of any such thing as part of the ODBC spec; quick consultation with one of the gurus here didn't produce any obvious links. I would expect it to be outwith the general scope of ODBC as a portable SQL-passing layer, because it would mandate direct intervention in the SQL in transit as a matter of core compliance, BICBW. ~Tim -- <http://spodzone.org.uk/> |