Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 20th, 2005, 04:54 PM
Registered User
 
Join Date: Oct 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot Connect to SQL Server

I was able to get the Access side of this to work without any problems. However I could not get it to access in SQL. I am using SQL Server 2000 sp4 Dev. I have set the permissions on sa and even tried using the anonymous login and still only recieved error 500.

Dim strDatabaseType
'strDatabaseType = "Access"
strDatabaseType = "MSDE"

If strDatabaseType = "Access" Then
  objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
               "Data Source=C:\BeginningASP3\Movie2000.mdb;" & _
               "Persist Security Info=False"

Else
   objConn.Open = "Provider=SQLOLEDB;Persist Security Info=False;" & _
                "User Id=sa;pwd=CBR600rr;Initial Catalog=Movie;" &_
              "Data Source=C:\Program Files\Microsoft SQL Server\MSSQL\DATA\Movie2000SQL.mdf"

End If

  #2 (permalink)  
Old October 24th, 2005, 02:45 PM
Registered User
 
Join Date: Oct 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have Resolved this issue with the following.

First I had to setup the OLEDB in windows for SQL via the Administrative tools, second I had to go into the registry and reset the Authentication type as mixed for MYSQL, it was initially set as <default> or Windows Authentication only. Finally I had to change the connection string to the following

Else

  objConn.Open "Provider=SQLOLEDB;Data Source=<server>;Initial Catalog=Movie2000SQL;User Id=<Name>; Password=<Password>;"

End If
<server> = name of server in SQL
<name><password> = user defined name and password

I do appreciate the help though :)


  #3 (permalink)  
Old October 25th, 2005, 10:27 AM
JLo JLo is offline
Registered User
 
Join Date: Oct 2005
Location: York, N.Yorkshire, United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Josh,

I'm going through the Beginning ASP 3.0 book at the mo, and i'm well stuck.

I can see you've had people write in about this problem before unfortunately the suggestions and help answers given don't get me any further so i've come to you.

Chapter 12 page 475, where you make your first connection to a SQL data store. I want to use the SQL connection rather than the Access one but the connection string in the book code is just wrong. When i setup an instance of MSDE it needs a password. Even if i put 'setup BLANKSAPWD=1' at the command prompt to make a password-free instance it still doesn't work.

It looks like you've figured it out from your last post but the stuff about first setting up OLEDB for SQL through admin tools can't figure out.

I need the following hand-holding:

      1. Exactly what should i type in at the command prompt to create my
         instance.
      2. Where should i place the database (MovieMSDE.mdf) file.
      3. Exactly what should i type as the connection string in the file
         Connect.asp where it currently reads:

            Else
                objConn.Open "Provider=SQLOLEDB;Persist Security Info=False;" & _
                      "User ID=sa;Initial Catalog=Movie;" & _
                      "Initial File Name=C:\MSSQL7\Data\Movie2000.mdf"

Thanks in advance cos this is doing my nut in.



Aaagh F***ing Computer!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to connect to a remote SQL Server? mizimizi SQL Server 2000 3 July 4th, 2006 01:47 PM
connect sql-server with c# technorakesh C# 1 April 22nd, 2006 08:09 AM
Cannot connect to SQL server tsimsha SQL Server ASP 1 July 22nd, 2005 07:21 AM
How to connect to SQL SERVER Wizard VB Databases Basics 1 February 5th, 2005 11:29 AM
[000] Unable to connect to server 'SERVER\SQL'; SQ ctanchan SQL Server 2000 1 August 15th, 2003 07:18 AM



All times are GMT -4. The time now is 07:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.