Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The program does not search for a table on the server
Message
De
23/11/2004 11:28:06
 
 
À
23/11/2004 11:02:23
Sixto Gonzalez
Smai Developers Ca
Vénézuéla
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
00963599
Message ID:
00963876
Vues:
7
Hi Sixto

Do you mean you don't know how to do this? If so:

an INI file is just a text file with .ini extension and some special features, e.g. MySystem.ini

In your example you might have as below in the file
[SystemPath]
SystemRoot = F:\USER_SYSTEM_PATH\
You need to declare a windows API function to read from the INI file, e.g. a function like:
PARAMETERS cSection, cEntry, cINIFile
LOCAL cDefault, cRetVal, nRetLen
cDefault = ""
cRetVal = space(255)
nRetLen = LEN(cRetVal)
DECLARE integer GetPrivateProfileString IN WIN32API ;
                STRING cSection, ;
                String cEntry, ;
                STRING cDefault, ;
                STRING @cRetVal, ;
                INTEGER nRetLen, ;
                STRING cINIFile 
nRetLen = GetPrivateProfileString(cSection,;
                                  cEntry, ;
                                  cDefault, ;
                                  @cRetVal, ;
                                  nRetLen, ;
                                  cINIFile)
return left(cRetVal,nRetLen)
Then, to call ReadIni, to get your user system path, let's assume you have the ini file in the same folder as your program:
lcDefault         = SYS(5) + SYS(2003)    && default path to your software 
lcIniFile		= lcDefault + "\USER.INI"
lcSystemRoot	= ALLTRIM( READINI( "SystemPath", "SystemRoot", lcIniFile))
lcSystemRoot now holds "F:\USER_SYSTEM_PATH\" and you can use it to get the sub-folders, as I indicatred in my last message. Thus, wherever you store your folders in the user's system, they can be found.

HTH

Terry

>Hi Terry Mcdonnell!!
>
>Thanks so very much!!!
>
>
>thank you very much but I not like reading from vfp a file INI, you can your say to me like Please...?
>
>Regards,
>
>Sixto
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform