Can FoxPro read/write Windows INI files?
: Can FoxPro read/write Windows INI files?
: Michele Chase
You can do this in at least two ways:
1. Using the low level file functions, open any text file and read it line
2. I think there is a sample of how to use foxtools.fll to read/write ini
information using the Windows API. Look at the foxtools.wri file, and
there may be some sample code with it.
>Can FoxPro read/write Windows INI files?
?fpini("Elvis", "Gravy", "Yes", "WIN.INI", "WRITE")
&& Read/Write INI files
&& (FoxPro for Windows ONLY)
PARAMETERS lpszSection, lpszEntry, lpszString, lpszFilename, jcAction
PRIVATE ALL LIKE j*
PRIVATE ALL LIKE lp*
PRIVATE ALL LIKE cb*
EXTERNAL ARRAY regfn
EXTERNAL ARRAY callfn
jcRetVal = ""
SET LIBRARY TO SYS(2004) + "FOXTOOLS" ADDITIVE
IF m.jcAction = "WRITE"
jnFunc = RegFn("WritePrivateProfileString", "CCCC", "I")
IF m.jnFunc >= 0
jnRetval = CallFn(m.jnFunc, m.lpszSection, ;
m.lpszEntry, m.lpszString, ;
lpszString = SPACE(10)
lpszReturnBuffer = REPLICATE(" ", 255)
cbReturnBuffer = 255
IF m.jnFunc >= 0
jnCharCount = CallFn(m.jnFunc, m.lpszSection, m.lpszEntry, ;
jcRetval = ALLTRIM(CHRTRAN(m.lpszReturnBuffer, CHR(0), "|"))
RELEASE LIBRARY SYS(2004) + "FOXTOOLS"
RETURN LEFT(m.jcRetVal, LEN(m.jcRetval) - 1)
I have a problem with a SQL-Database which is runnig on a networt with two
Pc's (Windows 98) with Centura 7.0.1. A week ago I have had a problem with
the hard disk. Since then the SQL-Database is not runnig anymore on the Pc
which is configurated as Client.
When I try to access to the database I get allways 3 error messages: (I
think the important information is in the first one, the other two errors
are only a result from the first one!)
1.) SQL.INI File error
WIN32CLIENT: Error. SQL Not Found Looking up error 03701
2.) MIDAS-Server cannot access database. Please check configuration
3.) Key violation. [INTERSOLV][ODBC SQLBase drivers][SQLBase] 00134 SQL CNO
Error. SQL not found looking up error 03701
Our technical consultant told us that is necessary to delete the hard disk
completely and to reinstall all programms.
I would be very grateful if somebody can give me some suggestions to resolve
the problem in another way!
Thanks in advance
Holzer KG - Sas
Hauptstra?e 8 - Via principale 8
I - 39028 Schlanders - Silandro (BZ)