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
- <html> <body bgcolor="33aa99">
- <form>
- <% n1=request(trim("n1"))
- n2=request(trim("n2"))
- n3=request(trim("n3"))
- n4=request(trim("n4"))
- n5=request(trim("n5"))
- n6=request(trim("n6"))
- n7=request(trim("n7"))
- n8=request(trim("n8"))
- n9=request(trim("n9"))
- DIM sd
- dim rs
- Set sd = Server.CreateObject("ADODB.Connection")
- sd.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&_
- Server.MapPath ("/logon.mdb") & ";"
- sd.Open
- rs.open "insert into students (AdmNo,DOB,SName,Clas,Sec,FName,MName,Adrs,Phone)"&_
- "values("&n1&",'"&n2&"','"&n9&"',"&n3&",'"&n4&"','"&n5&"','"&n6&"','"&n7&"','"&n8&"')"%>
- </center>
- <% rs.close
- sd.close
- %>
- <center> !Inserted Successfully!
- <a href="heading.asp"> <h3> Home</a></center>
- </form></body> </html>