PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → WB19: Correct Connection settings to local DB
WB19: Correct Connection settings to local DB
Débuté par Michael Q, 02 sep. 2014 15:29 - 4 réponses
Posté le 02 septembre 2014 - 15:29
I can't seem to find clear instructions for how to set the DB connection to a local HFSQL (Not Client/Server) DB in code. I am trying to do this on my development machine and although the connection seems to be automatic I need to learn how to control this code in the case of different servers etc.

If I have not set a usersname or password, what are the minimum settings to make a connection?

Many thanks,

Michael
Posté le 02 septembre 2014 - 15:43
Hi Michael:

hCreationIfNotFound()
hDescribeConnection()
hOpenConnection()
hChangeConnection()

Are your friends in that order...

Cheers,

Peter H.
Posté le 02 septembre 2014 - 17:44
Thanks Peter.

My problem is with the connection parameters....what to use?
This causes WB19 to crash:

MyConnection is Connection
MyConnection..User = ""
MyConnection..Password = ""
MyConnection..Source = "E:\WebDev 19\Inigo-2\Exe\"
//MyConnection..Server = ""
//MyConnection..Database = ""
//MyConnection..Provider = hAccessHF7 //??
//MyConnection..Access = hOReadWrite
//MyConnection..ExtendedInfo = ""
//MyConnection..CursorOptions = hClientCursor

HOpenConnection(MyConnection)


Michael
Posté le 02 septembre 2014 - 19:02
you can find one example using HDescribeConnection in <a class="ExternalLink" rel="nofollow" target="_blank" href="http://doc.windev.com/en-US/?1000003044205">http://doc.windev.com/en-US/&hellip;</a>
Posté le 02 septembre 2014 - 22:04
Hi Her is what I use with Windev 19
:
DBConn..Provider = hAccessHF7 DBConn..Server = gsLocalDBDir //Containing my DB directory
Cheers
Tor-Bjarne