|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
need help with connecting asp and mssql
hey there!
I know that this maybe an extremely stupid question but still, I urgently need some help with getting my asp connected to the mssql server 2000. i've done this before many times but then I was connecting to a remote computer with sql 7.0. now i have mssql 2000, i have dsn setup, it works properly (all the tests say that the connection is successful) but for some strange reason I cannot get any info using asp. It just tells me that Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. any ideas? lia |
|
#2
|
|||
|
|||
|
Hi Lia,
Have you double-checked your SQL Server account details and do you have the required access from the IIS server that your ASP script is on? Try running Query Analyzer on the SQL Server -- if this works then there's a good chance that your account doesn't have access from the IIS web server you're running your ASP scripts on. |
|
#3
|
|||
|
|||
|
Lia, please check that the DSN exists on the host server. My hosting company allows me to set up ODBC DSNs through a control panel online.. I always use the following code and have no problems:
'Create Connection Object set db = Server.CreateObject("ADODB.Connection") 'Specify Connection String db.ConnectionString= "dsn=myDsn;uid=myUid;pwd=myPassword;network=dbmssoc n;" 'Open the Connection db.open 'To close the connection use this db.close set db=nothing replace myDsn myUid and myPassword with your own values hope this helps |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > need help with connecting asp and mssql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|