468,514 Members | 1,250 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,514 developers. It's quick & easy.

Microsoft VBScript runtime (0x800A01A8) Object Required "

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
1 3751
Rabbit
12,513 Expert Mod 8TB
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.

Similar topics

reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.