senadaulay
Programmer
Hi,I'm New using ASP program so bare with me.I need to create a form so i can entry data to the table in Access. the database i use is Access, the connection using ODBC.to insert the data I'm using SQL syntax, but it's doesn't work. maybe someone could help me. heres my code.
If Request.Form ("Submit"
= "submit1" Then
intNo = Request.Form ("No"
varEmployeeNo = Request.Form ("EmployeeNo"
varSurname = Request.Form ("Surname"
varGivenName = Request.Form ("GivenName"
Session("Nomer"
= intNomer
Session ("EmployeeNo"
= varEmployeeNo
Session ("Surname"
= varSurname
Session ("GivenName"
= varGivenName
Set Conn = Server.CreateObject ("ADODB.Connection"
Conn.Open "DSN=MRegisterTbl"
Conn.Execute (strsql)
strsql="INSERT INTO Expat_EmployeeReg(No,EmployeeNo,Surname,GivenName,Address,WorkLocation,ProjectNo,Citizen,DateofBirth,GovernmentPosition)" &_
"VALUES('" & intNo & "','" & varEmployeeNo & "','" & varSurname & "','" & varGivenName & "','" & varAddress & "','" & varWorkLocation & "','" & varProjectNo & "','" & varCitizen & "','" & varDateofBirth & "','" & varGovernmentPosition & "')"
Conn.Execute strsql
thank's for the help
If Request.Form ("Submit"
intNo = Request.Form ("No"
varEmployeeNo = Request.Form ("EmployeeNo"
varSurname = Request.Form ("Surname"
varGivenName = Request.Form ("GivenName"
Session("Nomer"
Session ("EmployeeNo"
Session ("Surname"
Session ("GivenName"
Set Conn = Server.CreateObject ("ADODB.Connection"
Conn.Open "DSN=MRegisterTbl"
Conn.Execute (strsql)
strsql="INSERT INTO Expat_EmployeeReg(No,EmployeeNo,Surname,GivenName,Address,WorkLocation,ProjectNo,Citizen,DateofBirth,GovernmentPosition)" &_
"VALUES('" & intNo & "','" & varEmployeeNo & "','" & varSurname & "','" & varGivenName & "','" & varAddress & "','" & varWorkLocation & "','" & varProjectNo & "','" & varCitizen & "','" & varDateofBirth & "','" & varGovernmentPosition & "')"
Conn.Execute strsql
thank's for the help