PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Client/Server HF Database Criation
Client/Server HF Database Criation
Débuté par Marco Rego, 16 mai 2009 11:34 - 8 réponses
Posté le 16 mai 2009 - 11:34
Howdy!
Am trying to do my first project with a client server HF database but I get an error on the analysis generation. A window popped up asking for an user and password for the C/S HF database and I had none. I thought it would create the database for me.
My goal is to have a test database in the same computer I am doing the programming.
Any help please ?
______
Marco
Posté le 16 mai 2009 - 11:34
If you install HF C/S on your development machine. The default user name is admin and the password is blank. Make sure you can access with HF Control Center. You can create the data base there and copy classic files to the folder where the data resides.
Also in your analysis, test your connection to your server and that all the files you want in the data base are in the used by tab.
HTH
Jeff
Posté le 16 mai 2009 - 11:35
Hi Marco
see Guenter's HFCS in Windev Solution
http://forum.mysnip.de/read.php…
HTH
Toddy
Posté le 16 mai 2009 - 11:35
Hi,
- your analysis should NOT refer to a HF C/S-connection!! This it is what they did not tell you: the analysis has always to be HF Classic - your program has to connect to HFSQL when started.
- PC Soft had other (good) things in mind when they built the ability of connecting to a foreign database into the analysis, but for sure not to write a program which is bound to a HFSQL server with a fixed name and nothing else. If you're using a fixed HFSQL connection to the database, you'd have to have HFSQL servers on your client's computers with the same name. This is impossible, because on install time the HFSQL server will be named after the computer name where it is installed.
Regards,
Guenter

Howdy!

>Am trying to do my first project with a client server HF database but I get an error on the analysis generation. A window popped up asking for an user and password for the C/S HF database and I had none. I thought it would create the database for me.

My goal is to have a test database in the same computer I am doing the programming.


>Any help please ?



>______

Marco
Posté le 16 mai 2009 - 11:36
Hi !
I use HF/CS database and my tables into analisys are converted to HF/CS.
When you convert you analisys into HF/CS you will change type of the connection to your tables.
See into Analisys and right click on your table (File Description) to see name of your connection (maybe is default: Myconnection1). Then into project code->Initialization:
MyConnection1..Server = NetMachineName()
MyConnection1..Database = NameOfYourDatabase
MYConnection1..user ="Admin"
MYConnection1..password=""
HOpenConnection(MYConnection1)
You can also wide your system and make option to create new databases.
You can also create invisible EditField where you can access and edit location for your database, if you change computer where is H/F control center installed.
Your database will be created into C:\HF Server/bdd/NameOfYourDatabase
and you can copy your files there
I hope this will help you, if not ask further. This is really possible and I am found that this is very usefull.
Regards !
Posté le 16 mai 2009 - 11:36
Hi !

>I use HF/CS database and my tables into analisys are converted to HF/CS.

When you convert you analisys into HF/CS you will change type of the connection to your tables.


>See into Analisys and right click on your table (File Description) to see name of your connection (maybe is default: Myconnection1). Then into project code->Initialization:



>MyConnection1..Server = NetMachineName()

MyConnection1..Database = NameOfYourDatabase


>MYConnection1..user ="Admin"

MYConnection1..password=""


>

HOpenConnection(MYConnection1)


>

You can also wide your system and make option to create new databases.


>You can also create invisible EditField where you can access and edit location for your database, if you change computer where is H/F control center installed.

Your database will be created into C:\HF Server/bdd/NameOfYourDatabase


>and you can copy your files there



>I hope this will help you, if not ask further. This is really possible and I am found that this is very usefull.



>Regards !



>
Hi ICI,
the first problem with your approach i that you will not be able to produce a clean install CD with definition of restructuring the database after installation. This is needed because you will send updates to your customers. The program will try to restructure the database of your development machine too and it will not be able to find it.
Next, this is no way to install a multiuser program because the database will not sit on the same machine (NetMachineName(..) ) I invested a lot of time into this issue and found that there is virtually not other good way than to define the datafiles to be HF Classic in the analysis and to reconnect the files to the correct HFSQL server or to a directory with HF Classic files in it when the program is started.
See my example project:
http://www.windev.at/downloads/SetupHFClassicProject02.zip
Regards,
Guenter
Posté le 16 mai 2009 - 12:36
Jimbo, Thanks !
I will investigate your solution. If I understand you are talking about HF Classic files to be managed like H/F CS. Is that possible?????
Why than exist option to convert H/F classic files into real C/S. I am now confused. :cheers:
Posté le 16 mai 2009 - 15:14
Jimbo, Thanks !

>I will investigate your solution. If I understand you are talking about HF Classic files to be managed like H/F CS. Is that possible?????



>Why than exist option to convert H/F classic files into real C/S. I am now confused. :cheers:
Hi ICI,
1 - yes, HF Classic definition is the same as HFSQL-definition. Result: you just need to switch the connection. There is a pseudo-connection for HF Classic-Files available too. See my project. That project shows how to get Vista-compatibility too.
2 - Mostly for other databases (i.e. non HFSQL ones). For HFSQL it doesn't make much sense. Imho, if you are using HFSQL server then you should define your files being HF Classic and connect the analysis to the HFSQL server in order to retain the ability of your program to do a restructure of the customer's datafiles and not trying to do a restructure of your development files. The analysis stores your connection info which is delivered later together with your program to the customer's site ..
Btw: You cannot have automatic restructuring e.g. of an MSSQL-server database using a WinDev program. It's a bit more complex to do that.
Regards
Guenter
Posté le 16 mai 2009 - 23:56
I investigate your project and it is really great start point for all developers.
Yes. You make Vista compatibility also with fglobadir() and avoid UAC control on Vista.
And offcourse it work in Classic and HFCS mode. Really, really great start point.
Thank you for your information.
Best wishes.