Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS Version Problem?

Status
Not open for further replies.

sjuarez1979

Programmer
Jun 26, 2001
35
US
There's a script that I'm running off the localhost using IIS in WinXP which I think is IIS v 5.1 that works perfectly alright. As soon as I transferred the files and set it up on a Win2K Box, the script does not work. I have no idea why that would be the case. It involves shooting a semi-largey query into something like this:

Function fetchData(strQuery)

Dim cnnGetRows ' ADO connection
Dim rstGetRows ' ADO recordset
Dim arrDBData ' Array that we dump all the data into
'yes it is mySQL and it does work with other queries
strConnection = "driver={MySQL};server=localhost;database=StateLine"
Set cnnGetRows = Server.CreateObject("ADODB.Connection")
cnnGetRows.Open strConnection
Set rstGetRows = cnnGetRows.Execute(strQuery)
If rstGetRows.EOF Or rstGetRows.BOF Then
fetchData = Array("*")
Else
'Get data and stuff into array; set function to new array.
fetchData = rstGetRows.GetRows()
End If

'Close Connection
rstGetRows.Close
Set rstGetRows = Nothing
cnnGetRows.Close
Set cnnGetRows = Nothing

End Function

Now, the function works with other queries that I have made throughout the application. The error I receive is when I take an LBound on the returned Array; it says:


Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'LBound'
/primm/BBPost.asp, line 102


Heres the call to get the recordset array:

arrData = fetchData(strQuery)

(I've checked the query I put in and mySQL returns the recordset)
and here is the infamous line 102:

iRecFirst = LBound(arrData, 2)

I've outputted the query using Response.Write and ran the query in mySQL and it returned the recordset like a champ. The main issue is that it seems to work on WinXP IIS but not on Win2K. Any ideas??

thanks in advance
sjuarez1979
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top