CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Posts
    128

    Delete records produces page error

    I'm trying to delete records from an access table using ADO. Everything works fine on my test server but when I put it into production it produces a "The page cannot be displayed" error. All other ADO commands such as INSERT and SELECT within the same script work ok.

    Here is the code, any help appreciated:

    dim dsn
    dim Conn
    dsn="DBQ=" & Server.Mappath("access_db\db.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
    Set Conn = Server.CreateObject("ADODB.Connection")
    conn.mode=3
    Conn.Open dsn

    sql="delete from contacts where contact_id=1;"
    Set RS = Conn.Execute(SQL)

  2. #2
    Join Date
    Aug 2004
    Posts
    6
    Hi ,
    Check for the permission of the database by right clicking it..and viewing the permission ..you shld have full permission to delete the data..so do check that...

    might be one of the reason..


    Niranjan C

  3. #3
    Join Date
    Jul 2003
    Location
    Singapore
    Posts
    1,822
    you also might want to verify the data you are trying to delete.
    R. Thomas
    "Be anxious for nothing, but in everything by prayer and supplication, with thanksgiving, let your requests be made know to God; and the peace of God, which surpasses all understanding, will guard your hearts and minds through Christ Jesus."Philippians 4:6-7
    "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured