Hello I am new to ASP and Access Databases really as well. I primarily use PHP and MySQL/Postgre.I work for my university in web admin department and due to rather sloppy coding in the past by workers have to rewrite an ASP form that writes to an Access DB. I have a rather large application form in which I need to be able to have insert the info into a database.If someone could perhaps post code to get me started (connection to database, inserting example data etc.), i can probably figure it out from there. I've googled around and came up with a mess of code possibilities, none I've been able to edit into any working code for this scenario. Thanks ahead.
- Jesse Kemper

Pardon my lack of ASP knowledge if Im wayyyy off. But the below code i believe should work. I get an error though. The code and error are below. From what i understand (via google) perhaps the file needs permissions?

<%
	'Setup my dnsless connection
set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.mappath("ga_jobdesc_form.mdb")
conn.Open DSNtemp

'Add Data to database
SQLstmt="INSERT INTO Results(Year1,filler_first_name,filler_last_name)"
SQLstmt = SQLstmt & " VALUES ('" & request.form("AcademicYear") & "','" & request.form("filler_first_name") & "','" & request.form("filler_last_name") & "')"
conn.execute(SQLstmt)
conn.close
set conn = nothing
set sqlstmt = nothing 
%>
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

That error usually means a permissions problem, and that the Access database needs to have read/write permissions set for Everyone.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.