SQL String Length

Results 1 to 2 of 2

Thread: SQL String Length

  1. #1
    Join Date
    Dec 1969

    Default SQL String Length

    Hi, I&#039m very new to ASP and have pretty much figured out all I need to know about displaying Access databases on the web via ASP except for one thing. On smaller SQL statements everything seems to work, but on larger ones(nearly 1600 characters long), I keep getting the error:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e14&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] Syntax error (missing operator) in query expression &#039((([Inventory Table].Equipment) alike &#039%%&#039 Or Is Null) AND (([Inventory Table].Department) alike &#039%%&#039 Or Is Null) AND (([Inventory Table].[Base Description]) alike &#039%%&#039 Or Is Null) AND (([Inventory Table].[Service Tag # / Serial #]) alike &#039%%&#039 Or Is Null&#039. <BR><BR>As far as I can see, everything is correct. The code at this point is generated by Access itself and I really can&#039t find any fault with it. In the above error, the line is trimmed off at 254 characters for some reason. The actual line is much larger.<BR><BR>What I was wondering was if there is a limit to the length of the SQL statement and if there was any way of changing this max length to accommodate larger Queries?<BR><BR>Any help would be greatly appreciated.<BR><BR>Take care,<BR>Matt

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL String Length

    What Access is doing is showing you what it interpreted. If you notice there is no character or word in you alike parameter just &#039% %&#039 also when you concatenate the condition is null try using [Inventory Table].[Service Tag # / Serial #] is null.<BR><BR>Good Luck<BR><BR>

Posting Permissions

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