MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 17th, 2003, 09:06 AM
bzborow1 bzborow1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Canada
Posts: 84 bzborow1 User rank is Corporal (100 - 500 Reputation Level)bzborow1 User rank is Corporal (100 - 500 Reputation Level)bzborow1 User rank is Corporal (100 - 500 Reputation Level)bzborow1 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 17 h 51 m 9 sec
Reputation Power: 7
Connecting to SQL Server via ASP...

Hi there,

I have recently just started to get into SQL Server and am having trouble connecting to the database. I have a test database called "MovieMSDE" that i converted over from MS Access, but can't access it. I first tried using the 'sa' user id in my connection string but that didn't work. Then i set up a new account "WebUser" and gave it db_datareaderwriter privileges and tried to connect to the server but can't.

I've tried various methods on the web, as well as a couple in an ASP book i have...i have received some errors:

"user login failed for 'sa'....not a trusted connection"
"user login failed for 'WebUser"..."
"user login failed for DATASOURCE\IUSR_DATASOURCE"

any ideas?

ex 1: "Provider=SQLOLEDB.1;Data Source=ZBOROWSKI;Persist Security Info=False;" & _
"Integrated Security=SSPI;Database=MovieMSDE;User ID=WebUser;Password=testpwd"


i am totally stumped and getting angry w/sql server...

Reply With Quote
  #2  
Old December 17th, 2003, 04:59 PM
bzborow1 bzborow1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Canada
Posts: 84 bzborow1 User rank is Corporal (100 - 500 Reputation Level)bzborow1 User rank is Corporal (100 - 500 Reputation Level)bzborow1 User rank is Corporal (100 - 500 Reputation Level)bzborow1 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 17 h 51 m 9 sec
Reputation Power: 7
My bad! After a day of brainstorming this problem I've come to the realization i'm a bonehead!

I installed SQL Server using integrated windows security. So i re-configured SQL Server to use SQL Server Authentication and now everything works fine. My code:

Dim objConn, objRS
Set objConn = server.CreateObject("ADODB.Connection")
set objRS = server.CreateObject("ADODB.Recordset")

objConn.Provider = "SQLOLEDB.1"
objConn.Properties("Persist Security Info").Value = "False"
objConn.Properties("User ID").Value = "WebUser"
objConn.Properties("Password").Value = "password"
objConn.Properties("Initial Catalog").Value = "MovieMSDE"
objConn.Properties("Data Source").Value = "ZBOROWSKI"

objConn.Open

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Connecting to SQL Server via ASP...


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





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