Hi All,Please help me check my code. I have got running time error (0x800A01FB).An exception occurred: 'objConn.Execut e'
some records execute but some records don't. I have no idea how to solve them.
Thanks a lot.
Here is my code
some records execute but some records don't. I have no idea how to solve them.
Thanks a lot.
Here is my code
Code:
dim i_svAppDbConnstr, i_svDBConn
i_svAppDbConnstr = "Provider=OraOLEDB.Oracle;Data Source=database_name;User Id=user_id;Password=password;"
Set i_svDBConn = OpenConn(i_svAppDbConnstr)
Function OpenConn(strConnStr)
Dim objDbConn
Set objDbConn = Server.CreateObject("ADODB.Connection")
objDbConn.CursorLocation = 3
objDbConn.Open strConnStr
Set OpenConn = objDbConn
End Function
Function GetData(strQuery, objConn)
'On Error Resume Next
Dim objRS
Set objRS = objConn.Execute(strQuery) ' this line is error.
Set GetData = objRS
End Function
Function GetAppData(strQuery)
Set GetAppData = GetData(strQuery, i_svDbConn)
End Function
'I call the GetAppData function.
strsql = "Select * from ARTICLE where ART_NR = '" & trim(replace(reqName,"'","''")) & "'"
Set rstTrans = GetAppData(strSQL)
Comment