hello , i'm very new to sql server.
i'm using sql server 200 & winXP. I have a local server called "JO" and a dsn named "LocalServer".
Authentication is sql server authentication & window with username of "cying" and password "admin"
i can ping my server "JO" but cannot telnet it's sql_server_tcp_port.
this is the error code i obtained when try to open the connection:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
my connection string is as below :
set objcon = server.CreateObject("ADODB.Connection")
strConnection = "Provider=MSDASQL;Driver={SQL Server};Server=local;Data Source=LocalServer;User ID=cying;Password=admin;Persist Security Info=False"
objcon.open, strConnection
is there anything wrong with my connection string or setting?
pls help, thanks in advance
ok, i can now connect to sql server but another error occurs:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'Provider=MSDASQL'.
my connection string is as below :
strConnection = "Provider=MSDASQL;Driver={SQL Server};Server=(local);User ID=cying;Password=admin;Persist Security Info=False;"
do i need to put in data source? i created the user id under enterprise manager, (local) > serucity > logins. server access is set to permit. i even try log in with sa account but still comes out the same error.
pls help, thank u
|||Hi,
It looks like you're running into a known problem described in the BOL (http://msdn2.microsoft.com/en-us/library/ms190204.aspx):
Try changing "(local)" to the name of the server.
Il-Sung.
|||i manage to connect to db finally after changing the code, here's my new connection string
strConn = "Provider=MSDASQL;Driver={SQL Server};server=(local);uid=cying;pwd=admin;database=cying"
II-Sung, i'm using sql server 2000 and hav TCP/IP enabled
i think the cause of problem is uid & pwd, previously i used user name & password and failed to establish a connection
thanks for ur help though =)
No comments:
Post a Comment