Expand|Select|Wrap|Line Numbers
- <HTML>
- <Body>
- <Form Method=Post Action="Insert.asp">
- ROLL NO. <Input type=text Name=rol><br>
- Name <Input type=text Name=nm><br>
- Address <Input type=text Name=adr><br><br>
- <Input type=submit Value="Submit Info.">
- </form>
- <%
- Dim r, n, a, RS, conn, qr
- r = Request.Form("rol")
- n = Request.Form("nm")
- a = Request.Form("adr")
- Set conn = Server.CreateObject("ADODB.Connection")
- conn.Provider = "Microsoft.JET.OLEDB.4.0"
- conn.Open "c:/students.mdb"
- Set RS = Server.CreateObject("ADODB.Recordset")
- qr = "INSERT INTO t1(Roll,sNm,Address) Values( "&r&" , ' "&n&" ' , ' "&a&" ')"
- RS.Open qr, conn, 2, 3
- conn.Close
- set conn= nothing
- %>
- </body>
- </html>
This program gives foll. error :
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/DB-ex/Insert.asp, line 24
Please help