Hey all noob here, actually noob with coding also.
Basically i have my display web page with the questions on that the user must fill in. Then post it to go to another .asp page so that the info can be entered into the Access database.
Now on my questions page in my form i have the questions fields named - tblName or tblPersonal.
in my page that updates the database i have it as follows:
Dim name, position, lineman, depart, datejoined, lastworkdate, data_source, con, sql_insert
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function
tblName = ChkString(Request.Form("name"))
tblPosis = ChkString(Request.Form("position"))
tblLineMan = ChkString(Request.Form("lineman"))
tblDept = ChkString(Request.Form("depart"))
tblDateJoined = ChkString(Request.Form("datejoined"))
tblLastWorkDate = ChkString(Request.Form("lastworkdate"))
data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("exit.mdb")
sql_insert = "insert into users (name, position, lineman, depart, datejoined, lastworkdate) values ('" & _
name & "', '" & position & "', '" & lineman & "', '" & depart & "', '" & datejoined & "', '" & lastworkdate & "')"
So my question is in my table i have named it tblName, tblPosition etc. so did i do it correctly above by inserting it as: tblName = ChkString(Request.Form("name")) or should it beName = ChkString(Request.Form("tblName")) orName = ChkString(Request.Form("name")) and so on?i really do hope i am making any sense here! i dont really know how else to phrase what i am asking
Basically i have my display web page with the questions on that the user must fill in. Then post it to go to another .asp page so that the info can be entered into the Access database.
Now on my questions page in my form i have the questions fields named - tblName or tblPersonal.
in my page that updates the database i have it as follows:
Dim name, position, lineman, depart, datejoined, lastworkdate, data_source, con, sql_insert
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function
tblName = ChkString(Request.Form("name"))
tblPosis = ChkString(Request.Form("position"))
tblLineMan = ChkString(Request.Form("lineman"))
tblDept = ChkString(Request.Form("depart"))
tblDateJoined = ChkString(Request.Form("datejoined"))
tblLastWorkDate = ChkString(Request.Form("lastworkdate"))
data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("exit.mdb")
sql_insert = "insert into users (name, position, lineman, depart, datejoined, lastworkdate) values ('" & _
name & "', '" & position & "', '" & lineman & "', '" & depart & "', '" & datejoined & "', '" & lastworkdate & "')"
So my question is in my table i have named it tblName, tblPosition etc. so did i do it correctly above by inserting it as: tblName = ChkString(Request.Form("name")) or should it beName = ChkString(Request.Form("tblName")) orName = ChkString(Request.Form("name")) and so on?i really do hope i am making any sense here! i dont really know how else to phrase what i am asking