Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CA9Builder General Usage Questions

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
0
16
US
Hi,

How do we deal with the CA's property sheet's 255 char limit? The CA9Builder claims to have fixed this but doesn't go into any details.

Also not discussed is details on how to maintain it in the event of an underlying SQL table change. Do we have to recreate it all over from scratch or what?

I am storing my connection handle in a global object named goApp.nConnHandle, so would I set the datasource property to that value even if the global property is not in scope at the time of creating all the CAs. What is best practice?

Thanks,
Stanley

 
1. Very general, not just about the CA properties, the property window only allows 255 char long strings, but that is only a limit of the property windows, by code you can set it up to the 16M string length limit but the SQElecCmd, for example, will be limited by the remote database to shorter queries than that. And since you don't set that property, but choose fields etc nd the builder creates the SQL, it's set by code and doesn't have the property window limit.

2. This is not like views with an underlying structure change but, f course, you will need to adapt this, if you want new fields in the query and also when fields are removed. As it's recommendable to use the cursorschema, for best control about resulting VFP data types, you should not define queries like SELECT * FROM TABLE. But you could, if you do without that and rely on the types automatically set like you get them with SQLEXEC().

3. In general, when you have a property you need, a lazy code strategy is to let this be set at first access, ie create an access-method - datasource_access - which will be triggered everytime the property is accesed and then get a handle. That method will need to know how or where to gett it from and when goApp.nConnHandle does not exist at that time, you simply need to change order of initalization. There's no way around first making the connection to the database. You then need to override the builder code handling this by your specification of a DSN or connection string..

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top