Hi, anyone can help me?
My problem is data from Form of Asp does not appear in access database when i open the database. Why does this happen?
My table name:Cuba
my asp code:
I already check the odbc conection and i believe i do it correctly...I have check several time the code.Help from anyone would be aprreciated.
My problem is data from Form of Asp does not appear in access database when i open the database. Why does this happen?
My table name:Cuba
Code:
ID PK Nama Umur
Code:
<%@language="Javascript"%> <html> <body> <% var DSN ="C:/Inetpub/wwwroot/cubatry.mdb" var Conn = Server.CreateObject("ADODB.Connection"); Conn.Provider = "Microsoft.Jet.OLEDB.4.0" Conn.Open(DSN); if(Request("btnSubmit") == "submit") { var TryID = Request.Form("txtID") var TryName = Request.Form("txtName") var TryUmur = Request.Form("txtUmur") sql2="INSERT INTO Cuba lagi (ID, nama, umur) VALUES ('"+TryID+"','"+TryName+"','"+TryUmur+"')"; Conn.Execute(sql2); Conn.Close() Conn = null } %> <form name="cubaform" action="" method="post"> Nama:<input type="text" name="txtName" /><p> Umur:<input type="text" name="txtUmur" /><p> ID:<input type="text" name="txtID" /><p> <input type="submit" value="submit" name="btnSubmit"/> </form> </body> </html>
Comment