473,815 Members | 3,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Ope n (strSQL, objPagingConn, 3, 1, 4)
'adOpenStatic,a dLockReadOnly,a dCmdStoredProc

before this line, I added db connect:

objPagingConn = CreateObject("A DODB.Connection ")
objPagingConn.C ursorLocation = 3 'adUseClient
objPagingConn.C onnectionString = mstrConnectionS tring
objPagingConn.O pen

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

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

mstrConnectionS tring = "Provider=Micro soft.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 1529
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.goo glegroups.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.Ope n (strSQL, objPagingConn, 3, 1, 4)
'adOpenStatic,a dLockReadOnly,a dCmdStoredProc

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.goo glegroups.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.Ope n (strSQL, objPagingConn, 3, 1, 4)
'adOpenStatic,a dLockReadOnly,a dCmdStoredProc

before this line, I added db connect:

objPagingConn = CreateObject("A DODB.Connection ")
objPagingConn.C ursorLocation = 3 'adUseClient
objPagingConn.C onnectionString = mstrConnectionS tring
objPagingConn.O pen

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

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

mstrConnectionS tring = "Provider=Micro soft.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("startD ate")
endDate = Session("endDat e")
CityCode = Session("CityCo de")
breakfast = cint(Session("B reakfast"))
numberofstar= cint(Session("N umberOfStar"))
hotelname = Session("HotelN ame")

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.goo glegroups.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.Ope n (strSQL, objPagingConn, 3, 1, 4)
'adOpenStatic,a dLockReadOnly,a dCmdStoredProc

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.c om.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.Ope n (strSQL, objPagingConn, 3, 1, 4)
¤ 'adOpenStatic,a dLockReadOnly,a dCmdStoredProc
¤

I believe the last parameter should be ADODB.CommandTy peEnum.adCmdTex t 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.goo glegroups.com.. .
this is the code:

startDate = Session("startD ate")
endDate = Session("endDat e")
CityCode = Session("CityCo de")
breakfast = cint(Session("B reakfast"))
numberofstar= cint(Session("N umberOfStar"))
hotelname = Session("HotelN ame")

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.goo glegroups.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.Ope n (strSQL, objPagingConn, 3, 1, 4)
> 'adOpenStatic,a dLockReadOnly,a dCmdStoredProc
>
> 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
2726
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): <% MM_valUsername=CStr(Request.Form("username")) If MM_valUsername <> "" Then MM_redirectLoginSuccess="fixit_ebase.asp" MM_redirectLoginFailed="fixit_login.asp?failed=yes" MM_flag="ADODB.Recordset"
0
1908
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 compiled the VB.Net DLL and registered it so it can be used in the VB6 app using "regasm /tlb:VBNETClass.tlb VBNETClass.dll". From the VB6 app, I added a reference to the VB.Net DLL. (Both classes also reference the ADO 2.8 Library.) I then built...
5
29855
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 Long) As Boolean Dim rsAssignedUser As ADODB.Recordset Dim strSelectUser As String
0
3286
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 for example). When I try to set the connection property or try to open a recordset using the Command object I've got an error. Here is the mehotd code for the connection set error:
6
14001
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 and error 'Object reference not set to an instance of an object.' as soon as I try to access the data in the fields, I.e. at the line that reads 'KeyFlags(i) = rstFields("keyflag").value'
0
2891
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 passed to changePass.asp but after creating the code. I am getting this error ADODB.Recordset (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. The codes are here Login.asp ...
0
3524
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 http://www.codeproject.com/cs/database/DataTableToRecordset.asp , which learned us to convert an ADO.Net datatable to an ADODB.Recordset, needed by the Microsoft Office Spreadsheet Web Component (OWC11), we got an error on the checking of a TIME column.
2
1880
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. /dcme/newframe/verify.asp, line 48 Line 48 is:
1
2941
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 ordinal. /SNHC/Classes.asp, line 2701 And the line that the error message is point to in Classes.asp is:
1
3375
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 perform this operation. It is either closed or invalid in this context. /H3finalresult/include/accept_reject2.asp, line 18
0
9610
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10670
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10408
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10426
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10142
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9225
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6897
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3030
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.