473,569 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

connection string dring me nuts!

First, here's my code(replaced some info with "foo":

Dim strDBConnection
strDBConnection = _
"Provider=SQLOL EDB;" & _
"Persist Security Info=False;" & _
"Data Source=w2003\ti cketlog;" & _
"User ID=foo;" & _
"Password=f oo;" & _
"Database=f oo;"

Dim objConnection
Set objConnection = Server.CreateOb ject("ADODB.Con nection")
objConnection.O pen 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_connec tion.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?

Jul 22 '05 #1
2 1347
You must set the SQL-Server authentificatio n mode to "SQL Server and
Windows", not to "Windows only".

It is also possible that the password is wrong.

S. L.

"middletree " <mi********@HTO mail.com> wrote in message
news:uQ******** ******@tk2msftn gp13.phx.gbl...
First, here's my code(replaced some info with "foo":

Dim strDBConnection
strDBConnection = _
"Provider=SQLOL EDB;" & _
"Persist Security Info=False;" & _
"Data Source=w2003\ti cketlog;" & _
"User ID=foo;" & _
"Password=f oo;" & _
"Database=f oo;"

Dim objConnection
Set objConnection = Server.CreateOb ject("ADODB.Con nection")
objConnection.O pen 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_connec tion.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?

Jul 22 '05 #2
On Mon, 14 Feb 2005 22:49:30 -0600, "middletree "
<mi********@HTO mail.com> wrote:
First, here's my code(replaced some info with "foo":

Dim strDBConnection
strDBConnectio n = _
"Provider=SQLOL EDB;" & _
"Persist Security Info=False;" & _
"Data Source=w2003\ti cketlog;" & _
"User ID=foo;" & _
"Password=f oo;" & _
"Database=f oo;"

Dim objConnection
Set objConnection = Server.CreateOb ject("ADODB.Con nection")
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_connec tion.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
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
13725
by: B Dring | last post by:
I am trying to make a bunch of unicode constant strings. I am trying the following without success. Below is an example. Bad means that I get the following error "unclosed string literal". Is this due to the fact that 22hex is the ascii 34 double quote character? If so how do i work around? Note: They are not for display, they are for...
1
2493
by: Wayne... | last post by:
I'm trying to get asp to conect to a MySQL database, I've tried copying a few examples online that I found and I always get a 500 error with the code below. what am i doing wrong? any examples of a working connection string anyone could show me would be fantastic. thanks i advance. Wayne... <%@ LANGUAGE="VBSCRIPT" %> <%
2
2289
by: Lior | last post by:
Hi, I have an ASP.NET website that crashes under heavy load. I use a SQL Server DB. I get around 5500 hits per day. I keep getting the timeout expieried connection pool error. Sometimes it even throws and error about a DataReader connection being already open even though I only use Data Sets in my code. Please take a look and see if you can...
2
4360
by: Andrew Hunot | last post by:
I have VB code in VS2003 which creates a HttpWebRequest and performs a POST operation to a remote URL (an https site), which runs fine and receives a valid response. However exactly the same code in VS2005 (to the same site with the same data) causes an exception 'The underlying connection was closed: An unexpected error occurred on a...
0
679
by: Arno | last post by:
Hi, I've written a class for client-socket connection, but I get a lot of times the error message "Unable to read data from the transport connection" when restart reading the stream with socket.BeginRead in the Sub SocketIncomingMsg. I'm debugging now for weeks, but I can't detect where it's going wrong. the part of code where it fails:
0
1345
by: jegray | last post by:
I am very much a beginner in dealing with connection statments. I am getting the following error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' Data source name not found and no default driver specified /default.asp, line 32 Here is my connection include:
0
1179
by: jegray | last post by:
I am very much a beginner in dealing with connection statments. I am getting the following error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' Data source name not found and no default driver specified /default.asp, line 32 Here is my connection include:
5
6753
by: Frank Rizzo | last post by:
This is driving me nuts. I call the InternetDial API to open a dial-up connection and it just returns 0 (success) without actually making a call. Am I missing something really simple? I've tried disabling the lan connection, but all to no avail. Thanks. public class WinInetController {
7
4733
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
We have one connection string to our SQL Server 2000: "Data Source=WORKAPP;Initial Catalog=Parts_Data;Integrated Security=SSPI;User ID=public;Password=public"; Everyone can connect to the database in our plant except for the Restricted Users. Why can't the Restricted Users access this? How can we get around it?
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6287
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.