Connect to Compact SQL db via OLEDB connection in TD 3.1

General discussion forum about all databases other than SqlBase.
mathcom

Connect to Compact SQL db via OLEDB connection in TD 3.1

Post by mathcom » 15 Jun 2012, 12:14

Hi All,

I need to connect to Compact SQL database using TD 3.1 application. I far as I know there is no ODBC driver for Compact SQL and I have to use OLEDB connection.
Is it possible to establish OLEDB connection in TD 3.1? Does someone have short sample how can I do that?

BR,
Andrey Shustov

jmcnamara

Re: Connect to Compact SQL db via OLEDB connection in TD 3.1

Post by jmcnamara » 18 Jun 2012, 19:39

I don't recall that 3.1 supports OLEDB. Check for the functions SqlCreateSession() and SqlCreateStatement(). If those exist, it's supported. Look up help for those 2 functions and the system variable SqlUDL and you'll find what you need connected.

Jeff Luther

Re: Connect to Compact SQL db via OLEDB connection in TD 3.1

Post by Jeff Luther » 21 Jun 2012, 00:50

Good way to find out, Jim, and I got curious: Turns out v3.1 Help does list SqlCreateSession et al.

Andrew: put together a small test case for yourself and first, if you can, try OLEDB connecting to a DB brand you know works, like MS Sql Server. Here's a example of the session string, FYI, that I have for our MS SS 2005, just fill in the '<>' parts:

Set SqlUDL = "Provider=SQLOLEDB.1;Password=<password>;Persist Security Info=True;User ID=<userID>;Initial Catalog=<db>;Data Source=<server>"

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 1 guest