General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>
>Aah, this is interesting to me, I was getting the handle from the open remote view. I guess I will have to study SQLConnect and SQLDisconnect to get the connection the real way. My concern had come from the way I was obtaining the handle, from the View, so my concern was what when the DBC was closed and reopened would the handle be still valid, but your way I do not think that will ever be a problem, as the handle was obtained independently.
>
>Thanks a lot.
You are welcomed.
If you use remote views stored in the DBC, remember to set the SHARED property to .T. for all of them to use this method, otherwise they will still open a new connection each time.
DBSETPROP(cRemoteViewName, "VIEW", "ShareConnection", .T.)
Also use the correct version of SQLCONNECT so all your remote views can share the connection:
.ConnectionHandle = SQLConnect(cConnectionName, cUserID , cPassword, .T.)
Where cConnectionName is the name of the Connection used by the remote views.
And why would you close the Database in the middle of your application?
And I almost forget, of course do a (for example):
Open Database (goApp.DBCName)
before using SQLConnect
Carlos
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only