Need sample INSERT command -ASP/MS-Access 2007

Discussion in 'Databases' started by michaelelliott, Aug 5, 2012.

  1. 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!
     
  2. Elshadriel

    Elshadriel Winhost Staff

    Last edited by a moderator: Oct 14, 2015
  3. 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,
     
  4. Elshadriel

    Elshadriel Winhost Staff

    Last edited by a moderator: Oct 14, 2015

Share This Page