Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is an SQL statement limited to 256 char or some... (97)

    Is an SQL statement limited to 256 char or something b/c when I try to add another control as a query

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Is an SQL statement limited to 256 char or some... (97)

    Exactly where are you doing this? In the QBE window, or perhaps are you talking abou the recordsource of a form or the rowsource for a combo/list box? One way to reduce the length of an SQL statement is to use an alias for the tablename, so something like:

    SELECT Customer.CustomerName FROM Customers

    Becomes:

    SELECT C.CustomerName FROM Customers as C
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is an SQL statement limited to 256 char or some... (97)

    The maximum number of characters in a sql statement is approximately 64000 according the help file.
    Francois

  4. #4
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is an SQL statement limited to 256 char or some... (97)

    I designed a report & its recordsource is a query, criteria for the query is set to controls on a form which runs the report. I can

  5. #5
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is an SQL statement limited to 256 char or some... (97)

    Arage,
    A string can contain 65,400 characters.
    There must be somewhere an error in building the criteria.
    Put an breakpoint on the line before the error occur and look in the immediate window what's in the string.
    Francois

Posting Permissions

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