MS SQL7 connection strings ??? w/Win2k

Results 1 to 2 of 2

Thread: MS SQL7 connection strings ??? w/Win2k

  1. #1
    Joey Garcia Guest

    Default MS SQL7 connection strings ??? w/Win2k

    Greetings Everyone,<BR><BR>There are many examples for connecting to an Access DB but few out there for connecting to MS SQL Server. It should be a slam dunk but then again, ... [I&#039;ll skip the Microsoft rant].<BR>I tried the DSN and DSN-less approach and neither work. I created a DB and a table in MSSQL and inserted a row to select from. I also created a System DSN and I used the "Test Connection" button at the end of the Wizard and it worked fine. I also created a .udl file and used that Wizard to create a Connection String as well. I think a problem may ly in that my computer is a standalone and that makes the User ID and Password a little bit of a problem (I think). I have Win2k set up for one user all the time and the User ID is "Joey Garcia" and the password is blank and my results from ASP page throws this error:<BR><BR>Microsoft OLE DB Provider for SQL Server (0x80040E4D)<BR>Login failed for user &#039;Joey Garcia&#039; <BR><BR>This appears when I use a DSN-less connection string. See my copy below.<BR><BR>DSN-less Connection String<BR>strCS="Data Source=(local);Provider=SQLOLEDB;User ID=Joey Garcia;Initial Catalog=JunkDB"<BR><BR>The error message I get when I use a DSN Connection String is:<BR>Microsoft OLE DB Provider for SQL Server (0x80040E4D)<BR>[Microsoft][ODBC SQL Server Driver][SQL Server]Login<BR>failed for user &#039;LAPTOPIUSR_LAPTOP&#039;<BR><BR>where LAPTOP is my computer name and my connection string for this approach is below.<BR><BR>DSN Connection String<BR>strCS="DSN=MyJunkDB"<BR>This is the one that I tested and it succeeded.<BR><BR>Does anyone have any insight on how to successfully connect to MS SQL7 with Win2k on a standalone computer?<BR><BR>FYI,<BR>I&#039;ve read the articles on Connections Strings and I&#039;ve referred to the IIS5 Help ASP area for accessing data and I&#039;ve searched the Commonly Asked Questions at this site for database related questions. And I even have the Sams Teach Yourself ASP 3.0 in 21 Days book that points to this site.<BR><BR>

  2. #2
    Joey Garcia Guest

    Default RE: MS SQL7 ... Fixed it!!

    I had recently set up this laptop with all my applications and I forgot to create a logon in SQL Server and/or in Win2K for the UserID that I wanted to use. Once I did this the DSN approach still tested OK but wouldn&#039;t work in the ConnectionString but when I used the DSN-less ConnectionString it worked fine.<BR><BR>Here is my ConnectionString:<BR>strCS="Data Source=(local);Provider=SQLOLEDB;User ID=jgarcia;Password=;Initial Catalog=JunkDB"<BR><BR>Note that I have a blank password.<BR><BR>I hope this could help someone else.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts