I have an MS Access 2007 Database and using ASP - my "INSERT INTO" string from a prior host does not work here. I have used the DSN connection for the database and been able to successfully QUERY the database using ASP, but cannot seem to get the INSERT or UPDATE commands to work to Add or Edit records. Here's a portion of the connect string I am using for a QUERY (i.e. viewing data) for reference: <% Dim cnnSimple ' ADO connection Dim rs ' ADO recordset Set cnnSimple = Server.CreateObject("ADODB.Connection") cnnSimple.Open = "DSN=DSN_myusername_database;" Any help anyone might have would be much appreciated. Thanks!
You can try using a DSN-less connection. Please see this Knowledge Base article for sample code: http://support.Winhost.com/KB/a686/how-to-query-an-access-2007-database-with-asp-using.aspx
Thank you for the pointers, however I can already do a "query" and display records, my issue is finding an INSERT string that works on your system (i.e. to add records) or an UPDATE string (to edit records). None of the ones I've used in the past under ASP seem to work and the field names, etc. have not changed. I even tried simplifying it down to one field just to get something to work and I can't make it function. Thanks,
Are you getting any error messages? Could you also try enabling 'Full' trust? http://support.Winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx?manage=true The SQL syntax for Microsoft Access doesn't really change: http://msdn.microsoft.com/en-us/library/office/bb208861(v=office.12).aspx