Hey guys! I'm a beginner in ASP and I'm trying to figure out what this scripting language can give me, so I tried to develop a little web app. Here's my problem.
I'm just trying to access the sql server database to do some web base reporting but this bull-**** error always hinder me from looking at the result of my report.
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."
this is my code
objRS1.CursorType = adOpenKeyset
objRS1.LockType = adLockOptimistic
objRS1.Open strSQL <======THIS IS WHERE THE ERROR OCCURS
Number = objRS1.RecordCount
IF NOT objRS1.EOF THEN
ScriptName = request.servervariables("ScriptName")
Response.write "<TABLE WIDTH=""100%""><TR><TD><font size=1>"
response.write "Showing page <b>" & CurrentPage & "</b> of <b>" & TotalPages & "</b>: Entries " & NumPerPageOf & " - " & NumPerPageTo & " of <b>" & Number & "</b> Records...<br>"
Response.write "</font></TD><TD align=right>"
Response.Write ("<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=1 WIDTH=""100%""><TR>")
FOR i=0 to objRS1.fields.count-1
fname = objRS1.fields(i).Name
Response.Write ("<TH class=Header align=center><FONT SIZE=2 COLOR=white>")
Response.Write fname & "</a></FONT></TH>"
'This will display the field contents
WHILE NOT objRS1.EOF
count = count + 1
IF strClass = "odd" THEN
strClass = "even"
strClass = "odd"
FOR i=0 TO objRS1.fields.count-1
ThisRecord = objRS1(i)
IF isNull(ThisRecord) THEN
ThisRecord = " "
Response.Write ("<td valign=top CLASS=" & strClass & ">")
Set objRs1 = NOTHING
The connection string is located in a separate ASP file which was included in this particular page. I already included the ADOVBS.INC and still receive the error. I also tried referencing ADO 2.7 in the PROJECTS --> REFERENCES but it didn't work too. I don't know what's going on? Please help me!!! Thanks in advance!