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 July 20th, 2010, 02:36 PM
0kean 0kean is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2010
Posts: 1 0kean User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m
Reputation Power: 0
ASP 1.0 - Can't connect to SQL Server 2008

Please Help!!!
We have a server with SQL Server 2000 installed on it.
To connect to the SQL Server 2000 from the ASP application I use the following code:
myConn.Open ("Driver={SQL Server}; Server=ServerName; Database=myDB_db; UID=myUserID; PWD=myPWD; Trusted_Connection=No;")
This works, no problem.
Recently, we installed an instance of SQL Server 2008 on the same machine. The path to it is ServerName\InstanceOfSQL2008.
[1] The code:
myConn.Open ("Driver={SQL Server}; Server=ServerName\InstanceOfSQL2008; Database=myDB_db; UID=myUserID; PWD=myPWD; Trusted_Connection=No;")
gives error message: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
[2] The modified code:
myConn.Open ("Driver={SQL Server Native Client 10.0}; Server=ServerName\InstanceOfSQL2008; Database=myDB_db; UID= myUserID; PWD= myPWD; Trusted_Connection=No;")
gives error message: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
Using SQL Server Management Studio and the same credentials I can connect to the server “ServerName\InstanceOfSQL2008” and look at every table in the database but the application can’t make a connection.
Please help me understand the problem.

Reply With Quote
  #2  
Old July 21st, 2010, 06:59 AM
Ish Ish is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2010
Posts: 3 Ish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 55 sec
Reputation Power: 0
Use connection string

'define the connection string, specify database driver
CONN_STRING="DRIVER={SQL Server}; SERVER=SQLEXPRESS2008; UID=username; PWD=password; DATABASE=database"

all the best

Reply With Quote
  #3  
Old August 27th, 2010, 04:29 AM
SNK111 SNK111 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 14 SNK111 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 4 m 30 sec
Reputation Power: 0
How to connect to SQL server from C#

Check this article Connecting to SQL Server from C# .
It also describes how to pass embedded SQL queries and perform SELECT, INSERT, UPDATE statements and much more.

Reply With Quote
  #4  
Old October 5th, 2010, 02:58 AM
Jet1337 Jet1337 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2010
Posts: 4 Jet1337 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 12 sec
Reputation Power: 0
nice one thanks.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > ASP 1.0 - Can't connect to SQL Server 2008


Developer Shed Advertisers and Affiliates


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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap