PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Connection to SQL Server back end via an Ini file
Connection to SQL Server back end via an Ini file
Débuté par guest, 02 juil. 2008 16:38 - 3 réponses
Posté le 02 juillet 2008 - 16:38
Hi all,
Hope someone can steer me in the right direction.
I have code in my app startup which reads an Ini file which contains my connection settings.
I created a test exe from my app to test this out, however I purposely put in bogus connection settings to see what would happen when this failed. In my enthusiasm to steam ahead I had'nt put any code in my app to exit the app if I did'nt make a good connection, my mistake! However I was amazed to find that when I ran one of my windows I could actually get data in it from the SQL Server database I failed to connect to!.
Can someone advise me what's going on here, and more importantly how I can force my app to use the connection in my ini file.
Hope that makes sense
Mark
Posté le 02 juillet 2008 - 16:39
Mark
Look at in the help at:
HDescribeConnection. HOpenConnection, HChangeConnection
and use variabel which you get from a ini file
Jan
Posté le 02 juillet 2008 - 17:22
Jan,
Thanks very much I will do so now.
Mark
Posté le 02 juillet 2008 - 17:22
maybe the connection defined in the analysis has been used unintentionally ?
this could explain why you get any data
Heinz