Deltaflyer
Programmer
I am currently writing a reports page for an intranet for a large company. The reports will compile an SQL dependant upon about 50 different options that the users will choose. This part of the pages is not the problem, the reports accurately generate between 10 and 5000 records.
To make this a little more user friendly i would like to set the number of records to a page, and give hyperlinks to all the other pages. To do this i need to open a dynamic database so that i can get return values for oRecord.AbsolutePage and oRecord.PageCount and oRecord.RecordCount etc. etc. etc.
I have checked the coding against the coding in the manual and have come up blank, maybe i am missing something i don't know about.
The coding to access the database
Set oConnect = Server.CreateObject("ADODB.Connection"
Set oRecord = Server.CreateObject("ADODB.Recordset"
oConnect.Open "Database","",""
oRecord.Open SQLstr, oConnect, 2
I am using option 2 because i know that this is the adOpenDynamic flag, i have also tried tagging adOpenDynamic on the end like so
oRecord.Open SQLstr, oConnect, adOpenDynamic
but this doesn't work either. I always come up with the same error message,
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/tpar/customerreport.asp, line 120
Line 120 is the oRecord.AbsolutePage = CurrentPage line.
Please help as this could well be needed by several dozen other pages as well.
Thanks DeltaFlyer
%>
To make this a little more user friendly i would like to set the number of records to a page, and give hyperlinks to all the other pages. To do this i need to open a dynamic database so that i can get return values for oRecord.AbsolutePage and oRecord.PageCount and oRecord.RecordCount etc. etc. etc.
I have checked the coding against the coding in the manual and have come up blank, maybe i am missing something i don't know about.
The coding to access the database
Set oConnect = Server.CreateObject("ADODB.Connection"
Set oRecord = Server.CreateObject("ADODB.Recordset"
oConnect.Open "Database","",""
oRecord.Open SQLstr, oConnect, 2
I am using option 2 because i know that this is the adOpenDynamic flag, i have also tried tagging adOpenDynamic on the end like so
oRecord.Open SQLstr, oConnect, adOpenDynamic
but this doesn't work either. I always come up with the same error message,
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/tpar/customerreport.asp, line 120
Line 120 is the oRecord.AbsolutePage = CurrentPage line.
Please help as this could well be needed by several dozen other pages as well.
Thanks DeltaFlyer
%>