INI Files

INI Files

Post by Michele Cha » Fri, 03 Feb 1995 08:31:56



Can FoxPro read/write Windows INI files?

_____________________
Michele Chase

 
 
 

INI Files

Post by Allen J. Friedm » Fri, 03 Feb 1995 15:09:31


: 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
by 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.

 
 
 

INI Files

Post by Brian C. Jeps » Thu, 09 Feb 1995 11:42:37



>Can FoxPro read/write Windows INI files?

>_____________________
>Michele Chase


The following program should do what you want...

Try:

?fpini("Elvis", "Gravy", "Yes", "WIN.INI", "WRITE")

&&
&&
&& FPIni.prg
&&
&& 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, ;
                        m.lpszFilename)

   ENDIF

ELSE

   IF EMPTY(m.lpszString)
      lpszString = SPACE(10)
   ENDIF

   lpszReturnBuffer = REPLICATE(" ", 255)
   cbReturnBuffer = 255


   IF m.jnFunc >= 0
      jnCharCount = CallFn(m.jnFunc, m.lpszSection, m.lpszEntry, ;

                           m.cbReturnBuffer, m.lpszFilename)
      jcRetval = ALLTRIM(CHRTRAN(m.lpszReturnBuffer, CHR(0), "|"))
    ENDIF

ENDIF          
RELEASE LIBRARY SYS(2004) + "FOXTOOLS"

RETURN LEFT(m.jcRetVal, LEN(m.jcRetval) - 1)

 
 
 

1. SQL.INI - File Error 03701 - Win32CLIENT

Dear Newsreaders,

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:
     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
Michael Holzer

--
Holzer KG - Sas
Hauptstra?e 8 - Via principale 8
I - 39028 Schlanders - Silandro (BZ)
+39-0473-621717
+39-0473-620135

2. Where are the jobs in VB?

3. Referring values from INI file in ActiveX Script--Syntax Plz

4. How to use stored procedure

5. URG- INI File Size

6. PervasiveSQL2000 or MS Access???

7. INI File location - Hard Coded

8. Some questions about postgres backend connections

9. .INI file path

10. Using ini files..?

11. DTS GUI BUG: Dynamic Properties Task Reading From INI file

12. Using INI file with Dynamic properties task in SQL 2000

13. SQL 6.5 setup ini file