ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 13th, 2002, 08:04 AM
lia lia is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 1 lia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to lia
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

Reply With Quote
  #2  
Old September 13th, 2002, 09:55 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
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.

Reply With Quote
  #3  
Old September 21st, 2002, 10:30 PM
mediaman mediaman is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Bangkok
Posts: 1 mediaman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > need help with connecting asp and mssql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway