Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Microsoft OLE DB Provider for SQL Server error '80040e4d'

1,024 views
Skip to first unread message

Jill

unread,
Apr 2, 2003, 3:04:43 PM4/2/03
to
I am trying to install an application which receives XML from SQL
Server to generate the content on the page. The error I receive when
loading the page is:

Microsoft OLE DB Provider for SQL Server error '80040e4d'
Invalid connection string attribute

Everything works fine on my server (Windows 2000, SQL Server 2000).
The server I'm installing on is two seperate servers - one running
Windows NT and one running SQL Server 2000. Does anyone have any
ideas as to what would cause this error?

Here is my ASP code to access the XML Stream.

set conn = Server.CreateObject("ADODB.Connection")

dim sconn
sconn = "Provider=SQLOLEDB.1;DSN=time;User
ID=user;pwd=pwd;Database=db"

Conn.ConnectionString = sConn
Conn.CursorLocation = adUseClient
Conn.Open

Dim adoCmd
Set adoCmd = Server.CreateObject("ADODB.Command")
Set adoCmd.ActiveConnection = Conn

with adoCmd
.CommandText = "spField_Tickets"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("@intJOBid", adInteger,
adParamInput, , intJOBid)
.Parameters.Append .CreateParameter("@dtWorkingDate", adVarChar,
adParamInput, 10, dtWorkingDate)
end with

dim adoStreamQuery
Set adoStreamQuery = Server.CreateObject("ADODB.Stream")

adoStreamQuery.Open

adoCmd.Properties("Output Stream") = Response
adoCmd.Execute , , adExecuteStream

Thanks in advance,
Jill

Aaron Bertrand - MVP

unread,
Apr 2, 2003, 3:12:33 PM4/2/03
to
> sconn = "Provider=SQLOLEDB.1;DSN=time;User
> ID=user;pwd=pwd;Database=db"

Should be, perhaps

sconn = "Provider=SQLOLEDB.1;server=<ip or server
name>;UID=user;PWD=pwd;Database=db"

--
AB
www.aspfaq.com


Bob Barrows

unread,
Apr 2, 2003, 3:21:29 PM4/2/03
to
SQLOLEDB is an OLEDB provider. A DSN is an ODBC source. You are mixing
technologies.
See this page for examples of valid SQLOLEDB connection strings:
www.able-consulting.com/ado_conn.htm.

HTH,
Bob Barrows


"Jill" <jillgu...@yahoo.com> wrote in message
news:1bd472d.03040...@posting.google.com...

Jill Guillory

unread,
Apr 2, 2003, 3:42:59 PM4/2/03
to
Then how does it work fine with my server?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Aaron Bertrand - MVP

unread,
Apr 2, 2003, 4:02:35 PM4/2/03
to
> Then how does it work fine with my server?

I can't imagine that exact connection string works fine with any server,
sorry.

--
AB
www.aspfaq.com


Jill Guillory

unread,
Apr 2, 2003, 4:43:31 PM4/2/03
to
The problem is solved. It's not really an issue of the connection
string (although I will change the DSN). The issue is that they do not
have the correct user in the database. Thank you for your help.

Jill

0 new messages