I am having the same problem with the connection and html and ms access. I am making a guestbook but my code is not connecting to the database. The code in asp look like the following:
<% @language = vbscript %>
<% Option Explicit %>
<%Response.Buffer = false %>
<script language = vbscript runat = server>
Dim connObj, rsObj, strSQL, cmdObj
Dim AddName, AddPhone, AddE-mail, AddComments
Set connObj = Server.CreateObject("ADODB.Connection")
connObj.Open="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath
("F:/Senior Project/Contact_Info.mdb")
'connObj.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath
("Contact_Info.mdb") )
Set cmdObj = Server. CreateObject ("ADODB. Command")
cmdObj .ActiveConnection = connObj
Set rsObj = Server.CreateObject("ADODB.Recordset")
AddName = Request. Form ("Name" )
AddPhone = Request.Form ("Phone")
AddE-mail = Request. Form ("E-mail" )
AddComments = Request. Form ("Comments")
strSQL = "INSERT INTO Contact Information (Name,Phone,E-mail,Comments)"
strSQL = strSQL & "VALUES ("
strSQL = strSQL & "'" & AddName & "',"
strSQL = strSQL & "'" & AddLNAME & "',"
strSQL = strSQL & "'" & AddFNAME & "',"
strSQL = strSQL & "'" & AddCAM & "')"
cmdObj.CommandText = strSQL
cmdObj.Execute
connObj .Close
</script>
and i was wondering if the same code is suppose to be in the html code.