Board index » delphi » UpdateSQL Error: "Update Failed"

UpdateSQL Error: "Update Failed"

Using D3 on Win95.
Any idea why my updates via UpdateSQL always give back the error "Update
Failed"?  It still succeeds even though it generates the exception.  Here's
my code:

    UpdateQry.ModifySQL.Clear;
    UpdateQry.ModifySQL.Add('UPDATE ":MyAlias:' + Filename + '"');
    UpdateQry.ModifySQL.Add('SET Some_ID = ' + sNew_ID);
    UpdateQry.ExecSQL(ukModify);

Thanks for any insight you can provide.

<<<) Michael Kalousek

 

Re:UpdateSQL Error: "Update Failed"


Quote
Michael Kalousek wrote:
> Using D3 on Win95.
> Any idea why my updates via UpdateSQL always give back the error "Update
> Failed"?  It still succeeds even though it generates the exception.  Here's
> my code:

>     UpdateQry.ModifySQL.Clear;
>     UpdateQry.ModifySQL.Add('UPDATE ":MyAlias:' + Filename + '"');
>     UpdateQry.ModifySQL.Add('SET Some_ID = ' + sNew_ID);
>     UpdateQry.ExecSQL(ukModify);

    Use a TQuery to do this and your problems will go away.  You can copy your
code as-is, only the TQuery.ExecSQL method does not take a parameter.

    TUpdateSQL is intended to be used in conjunction with a TQuery, not by
itself.

    HTH,

    -Craig

--
Craig Stuntz   cstuntz@no_spam.vertexsoftware.com
----------------  -----------------------------
Delphi Developer  Vertex Systems Corporation
& Cat Wrangler   http://www.vertexsoftware.com

Other Threads