February 05, 2008

Tips - To Access a MDB by without DSN

It is difficult to configure DSN, whenever the script runs. By using following code, you can run the script without creating DSN.

[ ] STRING CONN_STRING = "Driver=" + Chr(123) + "Microsoft Access Driver (*.mdb)" + Chr(125) + ";Dbq=\\MyServer\usertest.mdb;Mode=16;"
[ ] HDATABASE dbConn
[ ] dbConn = DB_Connect(CONN_STRING)
[ ] DB_ExecuteSql(dbConn, command)

0 comments: