I've just changed over my intranet server from NT4/IIS4 to 2k/IIS5. Now one of the sections of our helpdesk doesn't work:
Function getLogDetails(logID)
SET DBConn = Server.CreateObject("ADODB.Connection"
DBConn.Provider = "MSDASQL"
DBConn.Open "DSN=helpdesk;UID=;PWD=;"
Set Session("DBConn" = DBConn
SQL1 = "SELECT [RequestID], [Text], [Date], [TechNote] FROM Log WHERE [ID] = " & CInt(logID)
SET rs1 = Server.CreateObject("ADODB.RecordSet"
rs1.Open SQL1, DBConn, 3,3
' Does this log exist ?
if (rs1.recordcount <> 1) then
getLogDetails = "-1"
else
For Each Item in rs1.Fields
returnString = returnString & Item.Value & "^"
Next
getLogDetails = returnString
End if
rs1.close
Set rs1 = Nothing
DBConn.Close
Set DBConn = Nothing
End Function
It keeps returning nothing. I tried running the query from withing Access itself and it returns the data. I think the ADO connection is working as other parts of the system work OK. Is there anything that could affect this between versions? I thought it was a problem with IIS to begin with but since have narrowed it down to this one function.
TIA
Rowan
Function getLogDetails(logID)
SET DBConn = Server.CreateObject("ADODB.Connection"
DBConn.Provider = "MSDASQL"
DBConn.Open "DSN=helpdesk;UID=;PWD=;"
Set Session("DBConn" = DBConn
SQL1 = "SELECT [RequestID], [Text], [Date], [TechNote] FROM Log WHERE [ID] = " & CInt(logID)
SET rs1 = Server.CreateObject("ADODB.RecordSet"
rs1.Open SQL1, DBConn, 3,3
' Does this log exist ?
if (rs1.recordcount <> 1) then
getLogDetails = "-1"
else
For Each Item in rs1.Fields
returnString = returnString & Item.Value & "^"
Next
getLogDetails = returnString
End if
rs1.close
Set rs1 = Nothing
DBConn.Close
Set DBConn = Nothing
End Function
It keeps returning nothing. I tried running the query from withing Access itself and it returns the data. I think the ADO connection is working as other parts of the system work OK. Is there anything that could affect this between versions? I thought it was a problem with IIS to begin with but since have narrowed it down to this one function.
TIA
Rowan