arguements of wrong type??

T

the other john

Here's my project info first...

DB: Access 2000
server: IIS 2003

Here is the error I'm getting...

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

/admin/website_specs_step1_process.asp, line 166

Here is where the error is occuring...

Dim rsClient, ClientSQL
Set rsClient = Server.CreateObject("ADODB.Recordset")
ClientSQL = "SELECT * FROM tbl_clients WHERE fld_client_Email=" &
Request.Form("Email") & ";"
rsClient.Open ClientSQL, objConn 'LINE 166

I usually get this error when I forget to reference the ado type
library dll with this...

<!-- METADATA TYPE="typelib" file="c:\Program Files\Common
Files\System\ado\msado15.dll" -->

These are the steps I have take to no avail...
1). I have double checked with the server administrator to verify the
dll is actually where it is supposed to be.

2). I have checked and rechecked to be sure I am referencing my
connection file correctly (e.g. the "objConn")

3). I have checked to be certain the DB table and fields are correct.

4). I have tried replacing the ado constants with literals (if I refer
to these correctly). I specified all the options instead of allowing
the defaults to kick in as well (e.g. connection, cursor, locktype,
option) and still no difference.

I don't know what else to do at this point. Any suggestions?

Thank you!!!

John
 
B

Bob Barrows [MVP]

the said:
Here's my project info first...

DB: Access 2000
server: IIS 2003

Here is the error I'm getting...

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are
in conflict with one another.

/admin/website_specs_step1_process.asp, line 166

Here is where the error is occuring...

Dim rsClient, ClientSQL
Set rsClient = Server.CreateObject("ADODB.Recordset")
ClientSQL = "SELECT * FROM tbl_clients WHERE fld_client_Email=" &
Request.Form("Email") & ";"
rsClient.Open ClientSQL, objConn 'LINE 166


I don't see where objConn was initialized and opened ...

ADO is not recognizing objConn as a connection object or a connection string
(bad idea to use a connection string here)
 
T

the other john

I'm referencing a connection file as an include. I do it exactly the
same way on the same server for other apps and it works so I'm at a
loss here.

'ADO is not recognizing objConn as a connection object or a connection
string
'(bad idea to use a connection string here)
Could you elaborate on this? I suspect my method is not a good way to
do this. If so I have to say I am so "frustrated"! I learn primarily
from books and they tell me to do things like this but when I talk to
experienced programmers on newsgroups and else where I find out this is
not the case. Arg! Not your fault certainly, just venting.
 
B

Bob Barrows [MVP]

the said:
I'm referencing a connection file as an include.

"connection file"?
I'm not sure what you are talking about there.
I do it exactly the
same way on the same server for other apps and it works so I'm at a
loss here.

Whatever. i don't have access to your include file so I don't know what is
in it.

Does objConn point at a connection object? Is it open?
Or does it contain a connection string?
'ADO is not recognizing objConn as a connection object or a connection
string
'(bad idea to use a connection string here)
Could you elaborate on this? I suspect my method is not a good way to
do this. If so I have to say I am so "frustrated"! I learn primarily
from books and they tell me to do things like this but when I talk to
experienced programmers on newsgroups and else where I find out this
is not the case. Arg! Not your fault certainly, just venting.

I can't comment on the method you are using because I don't know what it is.
If your include file looks like this:

<%
dim objConn
set objConn=createobject("adodb.connection")
objConn.Open "<valid connection string>"
%>

Then your method is fine. If instead, it contains:

<%
dim objConn
objConn="<valid connection string>"
%>

Then it is not fine.

It is a bad idea not to use an explicit, open connection object because
failure to do so can prevent connection pooling from working See:
http://msdn.microsoft.com/library/en-us/dnmdac/html/pooling2.asp
http://support.microsoft.com/?scid=kb;en-us;Q176056
http://support.microsoft.com/default.aspx?scid=kb;en-us;191572
http://support.microsoft.com/default.aspx?scid=kb;en-us;324686

connection failures caused by pooling disablement
http://support.microsoft.com/default.aspx?scid=kb;en-us;328476

implicit connections:
http://support.microsoft.com/?kbid=271128
 
T

the other john

This is the include file that references my connection string at the
top of every page that connects to the database...
<!--# include virtual="/xxxxxxxxxxxxxxxxx.asp"-->

This is what is inside the file referenced above...
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=E:\xxxxxxxxxxxxxxxxxxxxx.mdb"
%>

I still have to read everything you sent as it will take a long time to
read it all so if there is anything more you can add or this is adds
clarity I'm providing it now.
 
T

the other john

ok, from what I can see I am using an explicit connection so is there
something else I am not seeing?
 
B

Bob Barrows [MVP]

the said:
ok, from what I can see I am using an explicit connection so is there
something else I am not seeing?

I don't see anything. I still think it's the objConn variable. There aren't
any other arguments in that line except the sql statement string.
What do you get when you do:

response.write typename(objconn)

or this:

response.write objconn.state

Bob Barrows
 
T

the other john

what the.....????! it produces "empty"!! this is jacked, the same
object works with another app...I'll post back after I play with it
some more..

thanks Bob
 
T

the other john

ok, I just KNEW this was going to turn out to be something dumb ;-/

this works....
<!--#include virtual="/xxxxxxxxxxxxx.asp"-->

this doesn't...
<!--# include virtual="/xxxxxxxxxxxx.asp"-->

a space between the pound sign and "include". one dumb little space,
wow. well, thankfully, problem solved.

thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,348
Messages
2,571,448
Members
48,795
Latest member
Lonell Lee

Latest Threads

Top