Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > connection string dring me nuts!

Reply
Thread Tools

connection string dring me nuts!

 
 
middletree
Guest
Posts: n/a
 
      02-15-2005
First, here's my code(replaced some info with "foo":

Dim strDBConnection
strDBConnection = _
"Provider=SQLOLEDB;" & _
"Persist Security Info=False;" & _
"Data Source=w2003\ticketlog;" & _
"User ID=foo;" & _
"Password=foo;" & _
"Database=foo;"

Dim objConnection
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.Open strDBConnection
================================================== =====================

I hve code very similar to this which works perfectly, but when running this
on this new machine I built, it doesn't work. I get the following error:

Microsoft OLE DB Provider for SQL Server error '80004005'
Login failed for user 'foo'. Reason: Not associated with a trusted SQL
Server connection.
/includes/database_connection.inc, line 13

=====================================

Looking at the error description, it seems as though I need to add that
user. I have, of course, added that user to the machine, and also to the SQL
Server database. Not sure what to do with this.

I should add that ASP itself seems to be working. I did a response.write of
the current time to verify this.

Anyone got an idea where to look for answers?



 
Reply With Quote
 
 
 
 
Sylvain Lafontaine
Guest
Posts: n/a
 
      02-15-2005
You must set the SQL-Server authentification mode to "SQL Server and
Windows", not to "Windows only".

It is also possible that the password is wrong.

S. L.

"middletree" <> wrote in message
news:...
> First, here's my code(replaced some info with "foo":
>
> Dim strDBConnection
> strDBConnection = _
> "Provider=SQLOLEDB;" & _
> "Persist Security Info=False;" & _
> "Data Source=w2003\ticketlog;" & _
> "User ID=foo;" & _
> "Password=foo;" & _
> "Database=foo;"
>
> Dim objConnection
> Set objConnection = Server.CreateObject("ADODB.Connection")
> objConnection.Open strDBConnection
> ================================================== =====================
>
> I hve code very similar to this which works perfectly, but when running
> this
> on this new machine I built, it doesn't work. I get the following error:
>
> Microsoft OLE DB Provider for SQL Server error '80004005'
> Login failed for user 'foo'. Reason: Not associated with a trusted SQL
> Server connection.
> /includes/database_connection.inc, line 13
>
> =====================================
>
> Looking at the error description, it seems as though I need to add that
> user. I have, of course, added that user to the machine, and also to the
> SQL
> Server database. Not sure what to do with this.
>
> I should add that ASP itself seems to be working. I did a response.write
> of
> the current time to verify this.
>
> Anyone got an idea where to look for answers?
>
>
>



 
Reply With Quote
 
 
 
 
Jeff Cochran
Guest
Posts: n/a
 
      02-15-2005
On Mon, 14 Feb 2005 22:49:30 -0600, "middletree"
<> wrote:

>First, here's my code(replaced some info with "foo":
>
>Dim strDBConnection
>strDBConnection = _
> "Provider=SQLOLEDB;" & _
> "Persist Security Info=False;" & _
> "Data Source=w2003\ticketlog;" & _
> "User ID=foo;" & _
> "Password=foo;" & _
> "Database=foo;"
>
>Dim objConnection
>Set objConnection = Server.CreateObject("ADODB.Connection")
>objConnection.Open strDBConnection
>================================================= ======================
>
>I hve code very similar to this which works perfectly, but when running this
>on this new machine I built, it doesn't work. I get the following error:
>
>Microsoft OLE DB Provider for SQL Server error '80004005'
>Login failed for user 'foo'. Reason: Not associated with a trusted SQL
>Server connection.
>/includes/database_connection.inc, line 13
>
>=====================================
>
>Looking at the error description, it seems as though I need to add that
>user. I have, of course, added that user to the machine, and also to the SQL
>Server database. Not sure what to do with this.
>
>I should add that ASP itself seems to be working. I did a response.write of
>the current time to verify this.
>
>Anyone got an idea where to look for answers?


Start with the FAQ:

Why do I get database-related 80004005 errors?
http://www.aspfaq.com/show.asp?id=2009

Note the references to these:

http://www.aspfaq.com/show.asp?id=2138
http://www.aspfaq.com/show.asp?id=2126
http://support.microsoft.com/default.aspx/kb/306586

Jeff
 
Reply With Quote
 
 
 
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set the connection pool size in the Sybase connection string? Wei Lu ASP .Net 2 02-16-2009 09:51 AM
Web.config: connection string or connection key? rlueneberg@gmail.com ASP .Net 3 08-03-2007 09:37 PM
Connection String object Convert to String Variable Type =?Utf-8?B?TWlrZSBNb29yZQ==?= ASP .Net 2 10-26-2004 02:43 PM
Re: String.replaceAll(String regex, String replacement) question Mladen Adamovic Java 0 12-04-2003 04:40 PM
connection string exception : Format of the initialization string does not conform to specification starting at index 0 Gaurav ASP .Net 0 11-07-2003 10:24 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57