I have a SQL server database that has been set up to be accessed through active directory.
To access it I have created a SQL Server ODBC DSN using the wizard in the ODBC manager and can connect with the following code:
I want to avoid the setup of a ODBC DSN and was wondering if I can do a SQLCONNECTSTRING passing the ID, server etc.
The main reason is that this is then easier to deploy.
I've tried this by adding the UID and SERVER to the string conect but no joy.
Has anyone gone through this pain and has a solution I would appreciate it.
Thanks in advance,
Mark Davies
Warwickshire County Council
To access it I have created a SQL Server ODBC DSN using the wizard in the ODBC manager and can connect with the following code:
Code:
STORE SQLSTRINGCONNECT('dsn=saw_live') TO gnConnHandle
IF gnConnHandle < 0
= MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
ELSE
= MESSAGEBOX('Connection made', 48, 'SQL Connect Message')
= SQLDISCONNECT(gnConnHandle)
ENDIF
I want to avoid the setup of a ODBC DSN and was wondering if I can do a SQLCONNECTSTRING passing the ID, server etc.
The main reason is that this is then easier to deploy.
I've tried this by adding the UID and SERVER to the string conect but no joy.
Has anyone gone through this pain and has a solution I would appreciate it.
Thanks in advance,
Mark Davies
Warwickshire County Council