Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shared or not shared the connection in remote views
Message
From
28/01/2009 08:06:11
 
 
To
28/01/2009 05:57:38
Bruno Maddalozzo
Informatica Aziendale
Arsie, Italy
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Database:
MS SQL Server
Miscellaneous
Thread ID:
01377605
Message ID:
01377641
Views:
16
I've had these problems to and solved them this way:
* gcServerdb is the ODBC datasource, a string read from an .ini file

* Example from a the form's Load method:
* CursorSetProp('Buffering',5,'InventorySalesColor')  may not apply to your way of doing things 


If Not Dbused('Maintenance')
	Open Database 'Data\Maintenance' Shared
Endif

If Not Dbused('Inventory')
	Open Database 'Data\Inventory' Shared
Endif
Set Database To Maintenance

* Here's the important stuff !!!!!

If Vartype(lnSql) = 'U' Or Vartype(lnSql) = 'L'
	SQLSetprop(0,'Asynchronous',.F.)
	Public lnSql As Integer
	lnSql = SQLConnect(gcServerDb)
Endif

* End

Set NullDisplay To ''

Try
	Use BusinessNameFromBusinessId Connstring lnSql In 0 Nodata
	Use BusinessLineFromBusinessLineId Connstring lnSql In 0 Nodata

	Use InventorySalesColor Connstring lnSql In 0 Nodata
	
	Use SalesColors Connstring lnSql Nodata In 0
	CursorSetProp('Buffering',5,'SalesColors')
	
	Use Stations Connstring lnSql In 0
	CursorSetProp('Buffering',5,'Stations')

	Use InvoiceTypes Connstring lnSql In 0
	CursorSetProp('Buffering',5,'InvoiceTypes')

... aso
HTH



>I'm converting an application to use remote views to access SQLExpress2005 data.
>I need advice on establishing 'shared' or 'not shared' the connection used by views.
>Now I'm randomly receiving the following error message:
>'Connection myConnection is busy'
>
>TIA
>Bruno
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform