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

Microsoft VBScript runtime (0x800A01A8) Object Required "

P: 2
Sir,
I am trying with an asp page to handle with one Access Database. When I try to read from the Access file it comes correctly. But when I try to Add Records or Update the records it shows an error.
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
NewAdmdone.asp, line 20
Kindly check my program and guide me.

Expand|Select|Wrap|Line Numbers
  1. <html> <body bgcolor="33aa99">
  2. <form>
  3.  
  4. <% n1=request(trim("n1"))
  5. n2=request(trim("n2"))
  6. n3=request(trim("n3"))
  7. n4=request(trim("n4"))
  8. n5=request(trim("n5"))
  9. n6=request(trim("n6"))
  10. n7=request(trim("n7"))
  11. n8=request(trim("n8"))
  12. n9=request(trim("n9"))
  13.  
  14. DIM sd
  15. dim rs
  16. Set sd = Server.CreateObject("ADODB.Connection")
  17. sd.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&_
  18. Server.MapPath ("/logon.mdb") & ";"
  19. sd.Open
  20. rs.open "insert into students (AdmNo,DOB,SName,Clas,Sec,FName,MName,Adrs,Phone)"&_
  21.       "values("&n1&",'"&n2&"','"&n9&"',"&n3&",'"&n4&"','"&n5&"','"&n6&"','"&n7&"','"&n8&"')"%> 
  22.   </center>
  23.   <% rs.close
  24.      sd.close
  25.   %>
  26.   <center> !Inserted Successfully!
  27.    <a href="heading.asp"> <h3> Home</a></center>
  28.  
  29. </form></body> </html>
  30.  
Thanking you
Nov 30 '11 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,370
You never create your recordset object.
Nov 30 '11 #2

Post your reply

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