Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CusorAdapter & ConnectionsStrings
Message
From
21/09/2006 19:19:10
Hans-Otto Lochmann
Dr. Lochmann Consulting Gmbh
Frankfurt, Germany
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01155863
Message ID:
01156227
Views:
24
Hi Borislav,

coming home late, I checked it. It works fine, survives a "Total Clear" and CAs and DEs like it. I still haven't resolve the builder aspect, which should use it as well.

Thanks again!

Hans

>>My question:
>>Is there a way to have a "central place" to store a ConnectionString once, which can then be used in testing CursorAdapters, forms etc., and which can be included in the final application, so it can be loaded at installation time with "the" suitable ConnectionString?
>>

>If you use ODBC for your CAs, you could use one Connection for all CA. Keep in mind that every connection to SQL Sever slows down application. So you could store your sqlHandler AND connection string everywhere you want. If you didn't have application object that is visible in whole application, you could add these properties to _screen object (_screen is available even if you you a Top-Level form as Main screen). So In your main program you could do:
>IF NOT PEMSTATUS(_SCREEN,[cSQLString], 5)
>   _screen.AddProperty([cSQLString])
>ENDIF
>
>IF NOT PEMSTATUS(_SCREEN,[nSQLHandler], 5)
>   _screen.AddProperty([nSQLHandler])
>ENDIF
>
>_screen.cSQLString = ??? && Read your string
>
>_screen.nSQLHandler = SQLSTRINGCONNECT(_screen.cSQLString)
>*** Check for errors and if you can't connect just quit application
>Then in all of yours CAs put:
>this.DataSource = _screen.nSQLHandler
Previous
Reply
Map
View

Click here to load this message in the networking platform