Re: SQL UPDATE to Memo field problem

From: Kenneth M. Stilwell (ken_at_stilwellconsulting.com)
Date: 12/23/04

  • Next message: Fred Taylor: "Re: SQL UPDATE to Memo field problem"
    Date: Wed, 22 Dec 2004 23:36:25 -0800
    
    

    Fred,

    When I attempt to execute this command from my environment, I receive an
    error. I am using an ODBC driver on XP for Visual FP. (I am passing this
    statement from 4D (my environment) using.

    $iResult:=OC Set SQL in Cursor ($CursorID;$tSQL)

    ...and

    $iResult:=OC Execute Cursor ($CursorID)

    $iResult (gets assigned a 1 if OK, and a -1 if it fails)
    $CursorID = obvious
    $tSQL = the SQL statement that I have sent previously which I am trying to
    execute.

    The nature of my error is that $iResult returns a -1 and the field is not
    updated

    If it fails, I trap for errors and report them from my driver

    The error messages from the ODBC driver returns: (on the Set SQL in Cursor
    line)

    Error Number = 219
    Error Level = 300
    Description = "[Microsoft][ODBC Visual FoxPro Driver]Command contains
    unrecognized phrase/keyword"
    Status = 37000

    The OC Execute Cursor line also errors out, obviously.

    The only real differece between the 2 UPDATE statements is the addition of
    the Char(10)

    If I run the statement w/o the Char(10), then all appears OK, not errors and
    the FoxPro table updates correctly.

    Ken Stilwell

    On 12/22/04 10:05 PM, in article #vdChVL6EHA.3944@TK2MSFTNGP12.phx.gbl,
    "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote:

    > What do you mean, "does not work"? Do you not see all your text, it's not
    > formatted correctly, you get an error message, what?


  • Next message: Fred Taylor: "Re: SQL UPDATE to Memo field problem"

    Relevant Pages

    • Re: database assistant 8.0.5 is not executing
      ... Please, give me a light, when i execute PROGRAMS--oracleforwindows ... cursor and not shows any screen or window and i dont know why ??? ... any settings / path / environment on your machine before these errors ... with your Oracle software ... ...
      (comp.databases.oracle.server)
    • Deadlock in an application
      ... Findings: There are Selects, Inserts, Delete and Updates hapenning in the ... Each time the query is executed the sql engine would compile the ... The Insert/Updates were changed to execute using prepared ... The cursor or statements need to be closed right after use. ...
      (microsoft.public.sqlserver.jdbcdriver)
    • Re: ExecuteNonQuery() - Bach SQL Statement execution?
      ... > How do I know if my underlying driver supports this? ... Depends on the ODBC driver. ... > I am trying to use the ExecuteNonQuery() to execute multiple SQL update ...
      (microsoft.public.dotnet.framework.adonet)
    • REF CURSOR returns no rows
      ... My DataReader does not contain any ... I execute the SELECT statement in TOAD/ SQL PLUS and that works fine. ... Is there any limitations in returning complex selects in a REF CURSOR? ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: Selection.Find
      ... return the cursor to its original position when you're done. ... drastically slows the macro because Word has to redraw the screen each ... Using a Range object has none of those ... The 'Do While .Execute' statement relies on the fact that .Execute ...
      (microsoft.public.word.vba.general)