Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid RowSource(SQL) greater than 255 chars?
Message
 
 
To
14/07/1998 16:54:30
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00116704
Message ID:
00117343
Views:
24
Dragan,

This is the code I put in the Init of a cbo:
activate window "debug output"

this.RowSourceType = 3
this.RowSource = "SELECT Purchaseorder.iponumber, Supplier.cname, Purchaseorder.dissued," + ;
  "Purchaseorder.drequired, Purchaseorder.dshipped," + ;
  "Purchaseorder.dreceived, " + ;
  "ShipMethod.cValue as cShipMethod," + ;
  "Terms.cValue as cTerms, " + ;
  "Supplier.cphone, Supplier.cfax, Supplier.cemail " + ;
 "FROM  projectmgr!purchaseorder  " + ;
 "INNER JOIN projectmgr!supplier " + ;
  " ON  Supplier.iid = Purchaseorder.isupplier" + ;
 "INNER JOIN projectmgr!codes as ShipMethod" + ;
   " ON  iShipMethod = ShipMethod.iID" + ;
 "INNER JOIN projectmgr!codes as Terms " + ;
  "  ON  Purchaseorder.iterms = Terms.iID " + ;
 "WHERE Purchaseorder.iproject = ?projects.iID" + ;
 "ORDER BY Purchaseorder.iponumber"
 
debugout len( this.RowSource )
debugout this.RowSource

this.Comment = && copy of the above code

debugout len( this.Comment )
debugout this.Comment
The SQL command was truncated at 256 chars. RowSource seems to have some other internal limit (ie BUG). The Comment prints out len of 580 and the full string.

Yes, string constants are limited to 256 chars, which is beyond the practical length of actually working with a constant IMHO. There are not very many editors that even allow lines to be that long. Whenever I build long strings I do it in chunks of 30-80 characters at a time.

Strings memvars and string object properties are limited only by memory. Except in the above case for RowSource.

It bugs me to no end that the designer memo fields are limited to 254 characters it's not often I want to put more description on a class or field in a table, but since we can't it's a moot point.

> x="012345678901234501234567890123450123456789012345..." to a length of 320, and it bombed me with "syntax terror", but
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform