insert works on a table locally but not on host

Discussion in 'Classic ASP' started by TinaHut, Oct 18, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Locally I am using ASP version 3.0. At the front end I have an edit form with a drop down list of categories.

    In the code I am deleting references to the edited item in a table called CatLinkTable that the drop down list links to then repopulating the table with the selections from the changed (or not) drop down list. This works fine locally but only the delete bit works when uploaded. I have tried dropping the table, recreating completely locally and reuploading, plus deleting everything on the host(database files and tables) and reuploading. Any hints would be appreciated. Here's the part of the code that does the DELETE and then INSERT....
    When I response.write the pcode and catitem.value I have the correct values.

    >
    > ' deal with the category data
    > 'clear the categories ready to submit the changes -see below
    > SQLDel = "DELETE FROM CatlinkTable WHERE prodID = " & pcode
    > dbConn.execute SQLDel
    >
    > for each catitem in Upload.Form
    > if catitem.name = "catID" then
    > sqlADDCat = "INSERT INTO CatLinkTable (prodID, catID) VALUES ('" & pcode & "', '" & catitem.value & "')"
    > dbConn.execute sqlADDCat
    > end if
    > next
     
  2. Bruce

    Bruce DiscountASP.NET Staff

  3. Thanks for replying. I have just sorted this out. It seems that during the exporting of my tables the indexing got 'lost'. I reapplied the primary keys to the tables on the host and it now works. It took a lot of trawling the internet to come across this solution!
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page