Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ADODB.recordset error (ASP/.NET)

Reply
Thread Tools

ADODB.recordset error (ASP/.NET)

 
 
dradcnn@yahoo.com.sg
Guest
Posts: n/a
 
      09-22-2005
I built an ASP.NET application.The application was built using ASP
initially. Recently we migrated to ASP.NET, but we didn't recode the
script using .NET. We just add the aspcompat=true at each page
directive.

the error message is :

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

it stopped at line:

objPagingRs.Open (strSQL, objPagingConn, 3, 1, 4)
'adOpenStatic,adLockReadOnly,adCmdStoredProc

before this line, I added db connect:

objPagingConn = CreateObject("ADODB.Connection")
objPagingConn.CursorLocation = 3 'adUseClient
objPagingConn.ConnectionString = mstrConnectionString
objPagingConn.Open

strSQL = "Search_Result_Single #" & startDate & "#, #" &
endDate & "#, '" & CityCode & "', " & breakfast & ", " & numberofstar
& ", '" & HotelName & "'"

the connection string is assigned to mstrConnectionString, which is
defined in an include file as follows:

mstrConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
& Server.MapPath("database/HP.mdb") & ";User ID=Admin;"

when user starts my application from his browser, and he does a search
on the page, the query will be sent to db, the results are returned to
browser with a few pages; user may navigate between result pages, at
this time, no error is generated.

If the user leaves the web page idle for 20mins for more, and then he
tries to navigate between the web pages (by clicking on customised next
or previous button on the web page), above error will be generated.

My question here is why after sometime being idle the error happened
and not in the beginning?

has anyone got any idea what could be wrong? any help very much
appreciated.

 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-22-2005
Are you making any use of session values? Where are these variables,
startDate, endDate, CityCode, breakfast, numberofstar, and HotelName being
defined? Can we see that code?

Ray at home


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...

> Arguments are of the wrong type, are out of acceptable range, or are in
> conflict with one another.
>
>
> strSQL = "Search_Result_Single #" & startDate & "#, #" &
> endDate & "#, '" & CityCode & "', " & breakfast & ", " & numberofstar
> & ", '" & HotelName & "'"
>
> it stopped at line:
>
> objPagingRs.Open (strSQL, objPagingConn, 3, 1, 4)
> 'adOpenStatic,adLockReadOnly,adCmdStoredProc
>
> when user starts my application from his browser, and he does a search
> on the page, the query will be sent to db, the results are returned to
> browser with a few pages; user may navigate between result pages, at
> this time, no error is generated.
>
> If the user leaves the web page idle for 20mins for more, and then he
> tries to navigate between the web pages (by clicking on customised next
> or previous button on the web page), above error will be generated.



 
Reply With Quote
 
 
 
 
Pat
Guest
Posts: n/a
 
      09-22-2005
I guess it would be worth it re writing it in ASP.NET
And make use of the new ADONET
Parick

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I built an ASP.NET application.The application was built using ASP
> initially. Recently we migrated to ASP.NET, but we didn't recode the
> script using .NET. We just add the aspcompat=true at each page
> directive.
>
> the error message is :
>
> Arguments are of the wrong type, are out of acceptable range, or are in
> conflict with one another.
>
> it stopped at line:
>
> objPagingRs.Open (strSQL, objPagingConn, 3, 1, 4)
> 'adOpenStatic,adLockReadOnly,adCmdStoredProc
>
> before this line, I added db connect:
>
> objPagingConn = CreateObject("ADODB.Connection")
> objPagingConn.CursorLocation = 3 'adUseClient
> objPagingConn.ConnectionString = mstrConnectionString
> objPagingConn.Open
>
> strSQL = "Search_Result_Single #" & startDate & "#, #" &
> endDate & "#, '" & CityCode & "', " & breakfast & ", " & numberofstar
> & ", '" & HotelName & "'"
>
> the connection string is assigned to mstrConnectionString, which is
> defined in an include file as follows:
>
> mstrConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
> & Server.MapPath("database/HP.mdb") & ";User ID=Admin;"
>
> when user starts my application from his browser, and he does a search
> on the page, the query will be sent to db, the results are returned to
> browser with a few pages; user may navigate between result pages, at
> this time, no error is generated.
>
> If the user leaves the web page idle for 20mins for more, and then he
> tries to navigate between the web pages (by clicking on customised next
> or previous button on the web page), above error will be generated.
>
> My question here is why after sometime being idle the error happened
> and not in the beginning?
>
> has anyone got any idea what could be wrong? any help very much
> appreciated.
>



 
Reply With Quote
 
ching
Guest
Posts: n/a
 
      09-22-2005
this is the code:

startDate = Session("startDate")
endDate = Session("endDate")
CityCode = Session("CityCode")
breakfast = cint(Session("Breakfast"))
numberofstar= cint(Session("NumberOfStar"))
hotelname = Session("HotelName")

thanks.

Ray Costanzo [MVP] wrote:

> Are you making any use of session values? Where are these variables,
> startDate, endDate, CityCode, breakfast, numberofstar, and HotelName being
> defined? Can we see that code?
>
> Ray at home
>
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
>
> > Arguments are of the wrong type, are out of acceptable range, or are in
> > conflict with one another.
> >
> >
> > strSQL = "Search_Result_Single #" & startDate & "#, #" &
> > endDate & "#, '" & CityCode & "', " & breakfast & ", " & numberofstar
> > & ", '" & HotelName & "'"
> >
> > it stopped at line:
> >
> > objPagingRs.Open (strSQL, objPagingConn, 3, 1, 4)
> > 'adOpenStatic,adLockReadOnly,adCmdStoredProc
> >
> > when user starts my application from his browser, and he does a search
> > on the page, the query will be sent to db, the results are returned to
> > browser with a few pages; user may navigate between result pages, at
> > this time, no error is generated.
> >
> > If the user leaves the web page idle for 20mins for more, and then he
> > tries to navigate between the web pages (by clicking on customised next
> > or previous button on the web page), above error will be generated.


 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      09-22-2005
On 21 Sep 2005 19:56:26 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

I built an ASP.NET application.The application was built using ASP
initially. Recently we migrated to ASP.NET, but we didn't recode the
script using .NET. We just add the aspcompat=true at each page
directive.

the error message is :

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

it stopped at line:

objPagingRs.Open (strSQL, objPagingConn, 3, 1, 4)
'adOpenStatic,adLockReadOnly,adCmdStoredProc


I believe the last parameter should be ADODB.CommandTypeEnum.adCmdText and not adCmdStoredProc. The
parameter may also be omitted altogether since you're using a SQL string.

I would recommend using the enums instead of numeric literals in your Open statement.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-22-2005
That would be the problem then. The session times out after 20 minutes (the
default setting), so those variables get no value.

Ray at home

"ching" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> this is the code:
>
> startDate = Session("startDate")
> endDate = Session("endDate")
> CityCode = Session("CityCode")
> breakfast = cint(Session("Breakfast"))
> numberofstar= cint(Session("NumberOfStar"))
> hotelname = Session("HotelName")
>
> thanks.
>
> Ray Costanzo [MVP] wrote:
>
>> Are you making any use of session values? Where are these variables,
>> startDate, endDate, CityCode, breakfast, numberofstar, and HotelName
>> being
>> defined? Can we see that code?
>>
>> Ray at home
>>
>>
>> <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed) oups.com...
>>
>> > Arguments are of the wrong type, are out of acceptable range, or are in
>> > conflict with one another.
>> >
>> >
>> > strSQL = "Search_Result_Single #" & startDate & "#, #" &
>> > endDate & "#, '" & CityCode & "', " & breakfast & ", " & numberofstar
>> > & ", '" & HotelName & "'"
>> >
>> > it stopped at line:
>> >
>> > objPagingRs.Open (strSQL, objPagingConn, 3, 1, 4)
>> > 'adOpenStatic,adLockReadOnly,adCmdStoredProc
>> >
>> > when user starts my application from his browser, and he does a search
>> > on the page, the query will be sent to db, the results are returned to
>> > browser with a few pages; user may navigate between result pages, at
>> > this time, no error is generated.
>> >
>> > If the user leaves the web page idle for 20mins for more, and then he
>> > tries to navigate between the web pages (by clicking on customised next
>> > or previous button on the web page), above error will be generated.

>



 
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
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-30-2006 03:16 PM
Error connecting to SQLExpress 2005 locally (error: 26 - Error Locating Server/Instance Specified) hfk0 ASP .Net 2 03-27-2006 08:43 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM
Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error JavaQueries Java 1 03-01-2005 06:30 PM



Advertisments