Connecting to SQLserver from TD6.1

General discussion forum about all databases other than SqlBase.
Jos de Vries

Connecting to SQLserver from TD6.1

Post by Jos de Vries » 12 Feb 2014, 12:25

For some reason I am not able to connect from my TD6.1 application to a database running on MS SQL server (express). Connecting from SQLtalk however, works fine.

I Created a database 'Test' and configured a user DSN named 'odbcTEST' to the database. As stated in ccod.pdf page 1-7, I have no entry 'remodbname' in sql.ini, making the sqlrouter look into odbc.ini (or the registry I think). From SQLTalk, I'm able to connect, read and modify the database. Everything works fine here.

In TD6.1 I try to connect with the following lines of code:

Set SqlDatabase = 'odbcTest'
Set SqlUser = 'SysAdm'
Set SqlPassword = SqlUser
Set bOk = SqlConnect( hSqlTest )

From my TD6 application I Always get the error 401, cannot open database.

I think I'm missing something very stupid, but haven't got a clue. Any suggestions?


Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests