Need help getting started with MSSQL

I created a DB using the control panel. Databases -> MS SQL
I first created a login, then I created a database. I made a table and filled it with a single record.
Then I set up a DSN in ODBC Services. I selected the SQL wizard.
Then I used code that worked on another existing DB and changed the connection string to point to the dsn, user id and password that I had created in above steps.

When I go to the website where the asp code that opens the DB exists, I get an error that says:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

Any ideas on what to do next would be greatly appreciated.
 
I would recommend not using a DSN at all, but connecting directly.

"Driver={SQL Server};Server=127.0.0.1;Database=user_dbname;Uid=user_login;Pwd=password;"

change 127.0.0.1 to the proper IP
user_dbname, to the database name, in the format of username_databasename

user_login, just as it says
password, ditto
 
Stephen said:
I would recommend not using a DSN at all, but connecting directly.

Is this because there are performance improvement from not using a DSN? If so, how much of an improvement? I am somewhat new to SQL Server programming so if you could shed some light on this that would be great. Thanks!
 
That did it. Thanks!

I had used mssql5.m****here.biz (found in control panel) instead of a number IP. Once I changed to the number it started working. :)
 
Yes, there is a 15-30% improvement in using a direct connection, it also works more reliable.
 
Back
Top