PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 2024
→
SQL server with OLE DB access, how to reconnect
SQL server with OLE DB access, how to reconnect
Started by Sasha, Mar., 16 2017 4:32 PM - No answer
Connect yourself…
Sasha
#1
Registered member
1 message
Posted on March, 16 2017 - 4:32 PM
Greetings everyone,
is there an easy way to make WD try reconnect when a physical connection to a Db is lost?
I have next situation. I'm using OLEDB to connect to an SQL server db. When a connection problem occurs, WD throws an exception, which I'm able to trap. But, when I try to close the connection (declared by programming) , and reopen it, even if there's still no connection HOpenConnection will return True !? It seems that this approach won’t work.
Now, I did try declaring a new connection, in which case, HopenConnection would act predictably (it would try opening, and after a while return False value). Although it could work, I would like to avoid this approach, because the code within whole application relies upon using initial connection defined as a global object.
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text