Why would I be getting an empty string connection with the following code?
I want to use DSN. Is this the problem?
strType=Request.form("Type")
strArea=Request.form("Area")
strFirstName=Request.form("FirstName")
strLastName=Request.form("LastName")
stremail=Request.form("email")
strDate=Date
strComments=Request.form("Comments")
strDBType = "access"
Set objConn = Server.CreateObject("ADODB.Connection")
StrConnString = "comments.mdb" '## DSN
ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("comments.mdb")
objConn.Open ConnectionString
sqlQuery = "SELECT * FROM Comments"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open sqlQuery, objConn, 1, 2
objRS.AddNew
objRS("Type")=strType
objRS("Area")=strArea
objRS("FirstName")=strFirstName
objRS("LastName")=strLastName
objRS("email")=stremail
objRS("SubmitDate")=strDate
objRS("comments")=strcomments
objRS.Update
objRS.Close
Set objRS = Nothing