Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

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 ASP Free Forums Sponsor:
  #1  
Old June 25th, 2004, 04:23 PM
Mostarsky Mostarsky is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 Mostarsky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
SQL on local

Hi everebody

I have one question. How can I configure SQL Server for testing web applications localy? Please help me!!

Reply With Quote
  #2  
Old June 25th, 2004, 04:32 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,781 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 45 m 55 sec
Reputation Power: 470
You don't need to configure it in any special way, just make sure when you are connecting you are using the correct connectionstring and the user (login) is setup and has correct permissions on the database.

Reply With Quote
  #3  
Old July 9th, 2004, 11:55 AM
matt12511's Avatar
matt12511 matt12511 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 36 matt12511 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 15 sec
Reputation Power: 5
This is my question exactly. I am unsure what settings I have screwed up though.

Here is the error I am getting:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'Provider=sqloledb;Da'
/subscriptions/ProcessSub.asp, line 192

Line 192 is : dbSubs.execute(sql)

Here is the ASP code for the connection:

Code:
 <% 
' create an ADO database connection
set dbSubs = server.createobject("adodb.connection")
'dbSubs.Open "Driver = {SQL Server}; Server=(local); Database=Subscription;Uid=sa;Pwd=12511;" 
'dbSubs="Provider=sqloledb;Data Source=localhost;Initial Catalog=Subscription;Integrated Security=SSPI;"
dbSubs="Provider=sqloledb;Data Source=localhost;Initial Catalog=Subscription;User Id=sa;Password=12511;" 
 
'If any of our names have a single quote, we will need to doublt it for insert
chrFirstName = replace(chrFirstName, "'", "''")
chrLastName = replace(chrLastName, "'", "''")
chrAddress = replace(chrAddress, "'", "''")
chrCardName = replace(chrCardName, "'", "''")
chrCity = replace(chrCity, "'", "''")
 
' SQL insert statement to insert the subscription data into the database
sql = "insert into subscriptions(" & _
"chrFirstName, " & _
"chrLastName, " & _
"chrAddress, " & _
"chrCity, chrState, chrZipCode, chrPhone, chrEmail, chrCardName, " & _
"chrCardType, chrCardNumber, chrExpDate, intLength) Values ('" & _
chrFirstName & "', '" & chrLastName & "', '" & chrAddress & "', '" & _
chrCity & "', '" & chrState & "', '" & chrZipCode & "', '" & chrPhone & _
"', '" & chrEmail & "', '" & chrCardName & "', '" & chrCardType & "', '" & _
chrCardNumber & "', '" & chrExpDate & "', " & intLength & ")"
 
dbSubs.execute(sql)
'response.write(sql)
 
end if
%>


Notice I have tried several connection strings. I am unsure if the problem is with my connection strings or with my SQL settings. I have both windows and SQL Server authentication.

I am using the trial download of SQL Server on my computer. I am using http://localhost/subscriptions/ in a browser to test my files.

any other info you need?

Thanks!

Matt

Reply With Quote
  #4  
Old July 9th, 2004, 12:13 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,781 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 45 m 55 sec
Reputation Power: 470
try this
Code:
Set Conn = Server.CreateObject("ADODB.Connection")

Conn.Open "Provider=sqloledb;Data Source=(local);Initial Catalog=databaseName;User Id=username;Password=password;" 

If Conn.State = 1 Then
   Response.write("Connection is open")
Else
   Response.write("Connection couldn't be opened")
End If

Conn.Close

Set Conn = Nothing

Reply With Quote
  #5  
Old July 9th, 2004, 01:07 PM
matt12511's Avatar
matt12511 matt12511 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 36 matt12511 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 15 sec
Reputation Power: 5
Thanks so much.

It worked!

Matt

Reply With Quote
  #6  
Old July 16th, 2004, 04:16 AM
Tomasz Ptak Tomasz Ptak is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 17 Tomasz Ptak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Welcome
It's my first post in here
My problem seemed to be quite similar.
But while rewriting the code (I'm writing it on a standalone pc with no internet acces at all) I found a mistake in my spelling. Dumb me...
Thanks anyway

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > SQL on local


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 6 hosted by Hostway
Stay green...Green IT