473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

ADODB.recordset error (ASP/.NET)

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.

Nov 19 '05 #1
5 1513
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
<dr*****@yahoo.com.sg> wrote in message
news:11**********************@z14g2000cwz.googlegr 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.

Nov 19 '05 #2
Pat
I guess it would be worth it re writing it in ASP.NET
And make use of the new ADONET
Parick

<dr*****@yahoo.com.sg> wrote in message
news:11**********************@z14g2000cwz.googlegr 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.

Nov 19 '05 #3
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
<dr*****@yahoo.com.sg> wrote in message
news:11**********************@z14g2000cwz.googlegr 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.


Nov 19 '05 #4
On 21 Sep 2005 19:56:26 -0700, dr*****@yahoo.com.sg 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)
Nov 19 '05 #5
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" <dr*****@yahoo.com.sg> wrote in message
news:11**********************@z14g2000cwz.googlegr 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
<dr*****@yahoo.com.sg> wrote in message
news:11**********************@z14g2000cwz.googlegr 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.

Nov 19 '05 #6

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

Similar topics

1
by: Mark | last post by:
Hi - Can anyone please help with the error message below - server is XP Pro, and the ASP code it is failing at is (set MM_rsUser.ActiveConnection... as below): <%...
0
by: Dot Netizen | last post by:
I am having trouble passing an ADODB.Recordset from a VB6 application to a VB.Net class library using COM Interop. I am running this on XP SP2 with the .Net Framework 1.1 and MDAC 2.8 SP1. I've...
5
by: Simone | last post by:
Hello I hope you guys can help me. I am very new to ADO... I am creating a ADODB connection in a module and trying to access it from a command button in a form. Function fxEIDAssgn(plngEID As...
0
by: Andre Azevedo | last post by:
Hi all ! I've created a .net serviced component with only one method. This method receive an ADODB.Command object and execute it. The ADODB.Command object is created in the client process. (VB...
6
by: Andy Barber | last post by:
Hi, I'm trying to write an app that reads data from a table into a string variable for later use in my program. Below is a snippet of the code I'm using, which compiles ok, but at runtime I get...
0
by: Vash10 | last post by:
I have two asp files. Login.asp and changePass.asp. what i want to do is to make the user change his password after his first login. so what happens is login.asp is the first to be used then it is...
0
by: Screaming Eagles 101 | last post by:
Not sure in which group to post, sorry... We are using VB2005 on Windows XP. After getting my data in a datatable and parse it to a recordset according to the method on...
2
bmallett
by: bmallett | last post by:
I am getting the following error: Error Type: ADODB.Command (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another....
1
by: Shiller | last post by:
Experts, I keep getting the following error message when accessing a web page: ADODB.Recordset (0x800A0CC1) Item cannot be found in the collection corresponding to the requested name or...
1
by: shivasusan | last post by:
Hi Friends! Please Help me! How i can solve this error? Please explain me, what is the error and how to solve? Error Type: ADODB.Recordset (0x800A0E7D) The connection cannot be used to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...

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.