By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,313 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,313 IT Pros & Developers. It's quick & easy.

I have got error Microsoft VBScript runtime (0x800A01FB)

P: 17
Hi All,Please help me check my code. I have got running time error (0x800A01FB).An exception occurred: 'objConn.Execute'

some records execute but some records don't. I have no idea how to solve them.
Thanks a lot.
Here is my code
Expand|Select|Wrap|Line Numbers
  1. dim i_svAppDbConnstr, i_svDBConn
  2. i_svAppDbConnstr = "Provider=OraOLEDB.Oracle;Data Source=database_name;User Id=user_id;Password=password;"
  3.  
  4. Set i_svDBConn = OpenConn(i_svAppDbConnstr)
  5.  
  6. Function OpenConn(strConnStr)
  7.     Dim objDbConn
  8.     Set objDbConn = Server.CreateObject("ADODB.Connection")
  9.     objDbConn.CursorLocation = 3
  10.     objDbConn.Open strConnStr
  11.     Set OpenConn = objDbConn
  12. End Function
  13. Function GetData(strQuery, objConn)
  14. 'On Error Resume Next
  15.     Dim objRS
  16.     Set objRS = objConn.Execute(strQuery) ' this line is error.
  17.     Set GetData = objRS
  18. End Function 
  19. Function GetAppData(strQuery)
  20.     Set GetAppData = GetData(strQuery, i_svDbConn)
  21. End Function
  22.  
  23. 'I call the GetAppData function.
  24. strsql = "Select * from ARTICLE where ART_NR = '" & trim(replace(reqName,"'","''")) & "'"
  25. Set rstTrans = GetAppData(strSQL)
  26.  
Apr 15 '08 #1
Share this Question
Share on Google+
1 Reply


DrBunchman
Expert 100+
P: 979
Hi jimmylee,

There isn't a problem with your code (it works fine on my machine) but there it may be that you need to install a newer version of the MDAC (Microsoft Data Access Components). Basically this contains things like the ODBC drivers that hook you up to your databases and there is a bug in earlier releases that sometimes causes the problem you describe.

You can download the latest version of it here. Give it a try and see if it solves your problem.

Let me know how you get on.

Dr B
Apr 15 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.