Re: Dynamic SQL Statements

From: Cindy Winegarden (cindy.winegarden_at_mvps.org)
Date: 07/15/04

  • Next message: Dennis Longfellow: "Re: 4 Table Join"
    Date: Thu, 15 Jul 2004 10:57:08 -0400
    
    

    Hi Jerry,

    No one here has specifically mentioned that VFP has a limit of 255
    characters for a quoted string. As Rick said, you can break the string into
    pieces (<= 255 chars) and then concatenate the pieces before you execute the
    SQL.

    -- 
    Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP
    cindy.winegarden@mvps.org  www.cindywinegarden.com
    "Jerry" <Jerry@discussions.microsoft.com> wrote in message 
    news:646D747E-2A6D-4E63-82CE-C4879459707A@microsoft.com...
    > Hi, I'm trying to build & execute a SQL statement depending on the fields 
    > selected by the user.
    > For example:
    >    cSQL="SELECT Field1, Field2....."
    >    &SQL
    >
    > But I get a "Command contains unrecognized phrase/keyword" error when the 
    > cSQL variable is over 255 characters.
    >
    > Is there any way I can execute this command? Perhaps using a memo field?
    >
    > Thanks in advance,
    >
    > Jerry 
    

  • Next message: Dennis Longfellow: "Re: 4 Table Join"

    Relevant Pages

    • Re: Runtime.exec on Win98: stdin, stdout with long DOS command line?
      ... I can't get Runtime.execto work with DOS commands longer than 127 ... start.exe to execute my DOS command. ... command lines successfully that are longer than 127 characters. ...
      (comp.lang.java.programmer)
    • Re: Yesterdays date in format dd-mm-yyyy
      ... Veera writes: ... > I tried to execute your command. ... It looks like the - characters are not the correct ones. ...
      (comp.unix.questions)
    • Re: Windows XP command line limit
      ... Pointer to a null-terminated string that specifies the command line to execute. ... The maximum length of this string is 32K characters. ...
      (microsoft.public.win32.programmer.kernel)
    • Re: Parsing / " characters
      ... What do you mean by "the insert statement doesn't execute"? ... from the text file should contain quote marks or the other characters ... Does every line begin and end with a quote character? ... >in the field CODE, then the insert statement doesn't execute. ...
      (microsoft.public.access.externaldata)
    • Re: replace all ^p s unless followed by a date
      ... I created a macro with the code "msgbox asc" to ... and am having trouble getting rid of extra ^p characters. ... Set wdApp = CreateObject ... .Execute Replace:=wdReplaceAll ...
      (microsoft.public.word.vba.general)