Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP/SQL error message

Reply
Thread Tools

ASP/SQL error message

 
 
Micromanaged
Guest
Posts: n/a
 
      10-29-2004


Getting the following error message:

Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/safedevelopment/Credit/FairIsaac.asp, line 20

From this code:
Set cn = Session("cnn")
Set rstPhones = Server.CreateObject("ADODB.Recordset")

'CID = Session("CID")
'SID = Session("SID")

if ID > -1 then
set SQL= cn.Execute("SELECT Customers.[Company Name],
Customers.[Address Line 1], " & _
"Customers.[Address Line 2], Customers.City, Customers.State,
Customers.Zip, " & _
"Customers.[Company Phone],Customers.[Business Structure]FROM Customers
INNER JOIN Schedule on " & _
"Customers.[ID]=Schedule.[customer id]")

rstPhones.Open SQL, cn, adOpenDynamic, , adCmdText
end if

Ideas? Pointers? Tips? on what I am doing wrong would be appreciated.

Thanks in advance.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      10-29-2004
VB script doesn't know what VB constants are, so it doesn't know what
'adOpenDynamic' is supposed to mean.
make an #include to 'adovbs.inc' or use the number constant instead of the
variable.


"Micromanaged" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> Getting the following error message:
>
> Error Type:
> ADODB.Recordset (0x800A0BB9)
> Arguments are of the wrong type, are out of acceptable range, or are in
> conflict with one another.
> /safedevelopment/Credit/FairIsaac.asp, line 20
>
> From this code:
> Set cn = Session("cnn")
> Set rstPhones = Server.CreateObject("ADODB.Recordset")
>
> 'CID = Session("CID")
> 'SID = Session("SID")
>
> if ID > -1 then
> set SQL= cn.Execute("SELECT Customers.[Company Name],
> Customers.[Address Line 1], " & _
> "Customers.[Address Line 2], Customers.City, Customers.State,
> Customers.Zip, " & _
> "Customers.[Company Phone],Customers.[Business Structure]FROM Customers
> INNER JOIN Schedule on " & _
> "Customers.[ID]=Schedule.[customer id]")
>
> rstPhones.Open SQL, cn, adOpenDynamic, , adCmdText
> end if
>
> Ideas? Pointers? Tips? on what I am doing wrong would be appreciated.
>
> Thanks in advance.
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      10-29-2004
Micromanaged wrote:
> Getting the following error message:
>
> Error Type:
> ADODB.Recordset (0x800A0BB9)
> Arguments are of the wrong type, are out of acceptable range, or are
> in conflict with one another.
> /safedevelopment/Credit/FairIsaac.asp, line 20
>

..
http://www.aspfaq.com/show.asp?id=2112

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      10-29-2004
> set SQL= cn.Execute("...

Here you have a recordset object

> rstPhones.Open SQL, cn, adOpenDynamic, , adCmdText


The open statement doesn't expect a recordset object where you've placed it.
Replace the two above lines with:

set rstPhones = cn.Execute("...

And drop the Server.CreateObject("ADODB.Recordset") line.


 
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
Unspecified error Oracle error occurred, but error message could not be retrieved fro kanman Case Modding 0 04-25-2009 02:00 PM
Error message different than Context.Server.GetLastError.Message tshad ASP .Net 0 01-27-2005 06:38 PM
How to view error message instead of "internal server error"? Peter Rilling ASP .Net 2 08-07-2003 07:37 PM
Compiler Error Message: The compiler failed with error code 128. Yan ASP .Net 0 07-21-2003 10:49 PM
ODBC has error but no error message displayed Robert Brown ASP .Net 2 07-03-2003 11:47 AM



Advertisments