Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 02:19 PM
shank
Guest
 
Posts: n/a
Default SQL and DSN-Less connection

I've used the below DSN-Less template for a remote SQL DB, but having issues
trying to get it work on my local computer. Any idea what the values should
be? I get this error...

Error Type:
Provider (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done.

<%
Set MM_GenKSQL_STRING = Server.CreateObject("ADODB.Connection")
MM_GenKSQL_STRING.Provider = "sqloledb"
MM_GenKSQL_STRING.Properties("Data Source").Value = "local" 'I've tried
local and also my computer name
MM_GenKSQL_STRING.Properties("Network Library").Value = "local" 'I've
tried local and also my computer name
MM_GenKSQL_STRING.Properties("Initial Catalog").Value = "GenK" 'I know
this is correct
MM_GenKSQL_STRING.Properties("User ID").Value = "" 'connecting
locally - don't need a username
MM_GenKSQL_STRING.Properties("Password").Value = "" 'connecting
locally - don't need a password
MM_GenKSQL_STRING.open
%>


  #2  
Old July 19th, 2005, 02:19 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: SQL and DSN-Less connection

> <%[color=blue]
> Set MM_GenKSQL_STRING = Server.CreateObject("ADODB.Connection")
> MM_GenKSQL_STRING.Provider = "sqloledb"
> MM_GenKSQL_STRING.Properties("Data Source").Value = "local" 'I've tried
> local and also my computer name
> MM_GenKSQL_STRING.Properties("Network Library").Value = "local" 'I've
> tried local and also my computer name
> MM_GenKSQL_STRING.Properties("Initial Catalog").Value = "GenK" 'I know
> this is correct
> MM_GenKSQL_STRING.Properties("User ID").Value = "" 'connecting
> locally - don't need a username
> MM_GenKSQL_STRING.Properties("Password").Value = "" 'connecting
> locally - don't need a password
> MM_GenKSQL_STRING.open
> %>[/color]

Ugh, what is all this? STOP USING WYSIWYG CRAP TO PRODUCE ASP CODE.
http://www.aspfaq.com/2126

The server name should be "(local)" with the parens or "LOCALHOST" or
"127.0.0.1" or your IP address or your computer name. I don't know where
you got the idea to use "local"...

--
http://www.aspfaq.com/
(Reverse address to reply.)


 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles