Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Posts
    5

    Unanswered: When an Execute Error Happens

    I am using ACCESS 2000 as the db (not by choice, but by ISP restriction) for a website I am creating. I am managing the connection thru ADO in ASP.

    Whenever an error occurs while attempting to update/insert any memo field with a long string of text, two things are happening:

    1. It doesn't work. I receive an Execute error. I am resigned (almost) to splitting it up into smaller chunks and updating it that way.

    2. The .MDB is now locked up. Windows reports the file as "already in use." I have tried using error handler code (included within each page) to first close the connection and set it to nothing and then process the error. This isn't working (the db is still locked up tight) and can't even be opened directly in Access (reboot seems to be the only cure, but that lasts until the next error).

    Without appending code, does anyone have any suggestions? Or should I include a code example?

    Thanks.

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Code is always helpful. Which version of the Jet Provider are you using ? Which version of mdac are you using ? Are you using client-side or server-side cursors ? What is the error message you are receiving ?

  3. #3
    Join Date
    May 2002
    Posts
    5
    Jet version: 4.0 (recently applied its SP6 from Microsoft)
    MDAC: 2.6
    All data retrieval/manipulation via server-side code.

    I have displayed the resulting value for sSQL to ensure that the problem is not due to bad syntax.

    Code:
    ----------------------------------
    Set oConnection = Server.CreateObject("ADODB.Connection")
    oConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data source=C:\Inetpub\wwwroot\GCOM\gcom.mdb;"
    sSQL = "EXEC GameReviewEdit_Review_Upd " & _
    "'" & REPLACE(Request.Form("r_text"), "'", "''") & "', " & _
    "'" & REPLACE(Request.Form("r_comment"), "'", "''") & "', " & _
    "'" & Now() & "', " & _
    sMemberID & ", " & _
    Request.Form("review_id") & ";"
    oConnection.Execute(sSQL)


    QUERY CODE:
    ----------------------------------
    UPDATE review SET
    r_text = psText,
    r_comment = psComment,
    r_mod_datetime = pdtModDatetime,
    r_mod_member_id = piMemberID
    WHERE
    review_id=piReviewID;


    Error:
    --------------------------------------
    An exception occurred: 'oConnection.Execute'


    Thanks!

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    What is the length of the string that pushes the error to happen ? If you are not sure you may want to test to see at what point exactly pushes the update/insert into posting an error. Let me know.

Posting Permissions

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