PDA

View Full Version : ODBC Connection String definition and example(s)



HankFay
2013-02-09, 17:55
Since we use connection strings instead of DSN"s (as does just about anyone who wants to retain the sanity of their Support staff), it would be helpful to have documentation of the Lianja SQL Server ODBC driver.

thanks,

Hank

yvonne.milne
2013-02-11, 11:45
Hi Hank,

I'll add it in. The basic string is as follows:


lcDSNLess="DRIVER=Lianja ODBC Driver;" ;
+ "SERVERNAME=192.168.123.123;USERNAME=server-user;PASSWORD=user-password;DATABASE=southwind"
lnConnHandle=SQLSTRINGCONNECT(lcDSNLess)
if lnConnHandle > 0
sqlexec(lnConnHandle,"select * from shippers")
list
sqldisconnect(lnConnHandle)
endif

For the local machine you can also use:


SERVERNAME=?;USERNAME=?;PASSWORD=?

or


SERVERNAME=localhost;USERNAME=?;PASSWORD=?

HankFay
2013-02-11, 12:04
Thanks!

BTW: the Wiki is looking very good. Should I find missing commands/functions, would the best course of action be to ticket them, or report them here?

Hank

lianjasupport
2013-02-11, 12:20
Thanks.
Tickets are best: they can be easily tracked and dealt with and there's usually not much to discuss.

yvonne.milne
2013-02-11, 12:52
This information can now also be found in the Documentation Wiki (http://www.lianja.com/doc/index.php/Lianja_ODBC_Driver).