2012-07-21 13:55 UTC+0200 Viktor Szakats (vszakats syenar.net)
* contrib/hbide/idemain.prg
* contrib/hbmysql/tests/test.prg
* contrib/hbmysql/utils/dbf2mysq.prg
* contrib/hbpgsql/tests/dbf2pg.prg
* examples/hbapollo/tests/test02.prg
* examples/hbapollo/tests/test05.prg
* examples/hbapollo/tests/test07.prg
* examples/hbapollo/tests/test08.prg
* examples/hbapollo/tests/test11.prg
* examples/hbapollo/tests/test12.prg
* examples/hbapollo/tests/test13.prg
* examples/hbapollo/tests/test14.prg
* examples/hbapollo/tests/test15.prg
* examples/hbapollo/tests/test20.prg
* examples/hbapollo/tests/test21.prg
* examples/hbapollo/tests/test22.prg
* examples/hbapollo/tests/test23.prg
* examples/hbapollo/tests/test24.prg
* examples/hbapollo/tests/test25.prg
* examples/hbapollo/tests/test26.prg
* examples/hbapollo/tests/test27.prg
* examples/hbapollo/tests/test28.prg
* examples/hbapollo/tests/test29.prg
* examples/hbapollo/tests/test30.prg
* examples/hbapollo/tests/test34.prg
* examples/hbapollo/tests/test35.prg
* examples/hbapollo/tests/test36.prg
* examples/hbapollo/tests/test37.prg
* examples/hbapollo/tests/test38.prg
* examples/hbapollo/tests/test39.prg
* examples/hbapollo/tests/test41.prg
* examples/hbapollo/tests/test42.prg
* examples/hbapollo/tests/test43.prg
* examples/hbapollo/tests/test45.prg
* examples/hbapollo/tests/test46.prg
* examples/hbapollo/tests/test47.prg
* examples/hbapollo/tests/test50.prg
* examples/hbapollo/tests/test51.prg
* examples/hbapollo/tests/test52.prg
* examples/hbapollo/tests/test53.prg
* examples/hbapollo/tests/test54.prg
* examples/hbapollo/tests/test55.prg
* examples/hbapollo/tests/test56.prg
* examples/hbapollo/tests/test57.prg
* examples/hbapollo/tests/test58.prg
* examples/hbapollo/tests/test60.prg
* examples/hbapollo/tests/test61.prg
* examples/httpsrv/uhttpd.prg
* tests/fsplit.prg
* deleted archaic SET EPOCH commands, using SET CENTURY ON
instead
* use SET DATE ANSI
* some formatting
This commit is contained in:
@@ -16,10 +16,65 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-07-21 13:55 UTC+0200 Viktor Szakats (vszakats syenar.net)
|
||||
* contrib/hbide/idemain.prg
|
||||
* contrib/hbmysql/tests/test.prg
|
||||
* contrib/hbmysql/utils/dbf2mysq.prg
|
||||
* contrib/hbpgsql/tests/dbf2pg.prg
|
||||
* examples/hbapollo/tests/test02.prg
|
||||
* examples/hbapollo/tests/test05.prg
|
||||
* examples/hbapollo/tests/test07.prg
|
||||
* examples/hbapollo/tests/test08.prg
|
||||
* examples/hbapollo/tests/test11.prg
|
||||
* examples/hbapollo/tests/test12.prg
|
||||
* examples/hbapollo/tests/test13.prg
|
||||
* examples/hbapollo/tests/test14.prg
|
||||
* examples/hbapollo/tests/test15.prg
|
||||
* examples/hbapollo/tests/test20.prg
|
||||
* examples/hbapollo/tests/test21.prg
|
||||
* examples/hbapollo/tests/test22.prg
|
||||
* examples/hbapollo/tests/test23.prg
|
||||
* examples/hbapollo/tests/test24.prg
|
||||
* examples/hbapollo/tests/test25.prg
|
||||
* examples/hbapollo/tests/test26.prg
|
||||
* examples/hbapollo/tests/test27.prg
|
||||
* examples/hbapollo/tests/test28.prg
|
||||
* examples/hbapollo/tests/test29.prg
|
||||
* examples/hbapollo/tests/test30.prg
|
||||
* examples/hbapollo/tests/test34.prg
|
||||
* examples/hbapollo/tests/test35.prg
|
||||
* examples/hbapollo/tests/test36.prg
|
||||
* examples/hbapollo/tests/test37.prg
|
||||
* examples/hbapollo/tests/test38.prg
|
||||
* examples/hbapollo/tests/test39.prg
|
||||
* examples/hbapollo/tests/test41.prg
|
||||
* examples/hbapollo/tests/test42.prg
|
||||
* examples/hbapollo/tests/test43.prg
|
||||
* examples/hbapollo/tests/test45.prg
|
||||
* examples/hbapollo/tests/test46.prg
|
||||
* examples/hbapollo/tests/test47.prg
|
||||
* examples/hbapollo/tests/test50.prg
|
||||
* examples/hbapollo/tests/test51.prg
|
||||
* examples/hbapollo/tests/test52.prg
|
||||
* examples/hbapollo/tests/test53.prg
|
||||
* examples/hbapollo/tests/test54.prg
|
||||
* examples/hbapollo/tests/test55.prg
|
||||
* examples/hbapollo/tests/test56.prg
|
||||
* examples/hbapollo/tests/test57.prg
|
||||
* examples/hbapollo/tests/test58.prg
|
||||
* examples/hbapollo/tests/test60.prg
|
||||
* examples/hbapollo/tests/test61.prg
|
||||
* examples/httpsrv/uhttpd.prg
|
||||
* tests/fsplit.prg
|
||||
* deleted archaic SET EPOCH commands, using SET CENTURY ON
|
||||
instead
|
||||
* use SET DATE ANSI
|
||||
* some formatting
|
||||
|
||||
2012-07-20 15:23 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/idefindreplace.prg
|
||||
! Fixed: Find action in FindInFiles was opening the source in
|
||||
"Main" view before searching. It should had been if source
|
||||
! Fixed: Find action in FindInFiles was opening the source in
|
||||
"Main" view before searching. It should had been if source
|
||||
is opened only then take it from editing instance otherwise
|
||||
from disk. I suspect yesterday night I was too tired.
|
||||
|
||||
|
||||
@@ -126,7 +126,6 @@ FUNCTION Main( ... )
|
||||
|
||||
SET DATE TO ANSI
|
||||
SET CENTURY ON
|
||||
SET EPOCH TO 1970
|
||||
|
||||
QResource():registerResource_1( hbqtres_HbIde() )
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ PROCEDURE Main( cArg )
|
||||
LOCAL oQuery
|
||||
|
||||
SET CENTURY ON
|
||||
SET EPOCH TO 1960
|
||||
|
||||
oServer := TMySQLServer():New( "localhost", "root", "" )
|
||||
IF oServer:NetErr()
|
||||
|
||||
@@ -52,128 +52,127 @@
|
||||
|
||||
#include "inkey.ch"
|
||||
|
||||
procedure main(...)
|
||||
PROCEDURE Main( ... )
|
||||
|
||||
local cTok
|
||||
local cHostName := "localhost"
|
||||
local cUser := "root"
|
||||
local cPassWord := ""
|
||||
local cDataBase, cTable, cFile
|
||||
local aDbfStruct, i
|
||||
local lCreateTable := .F.
|
||||
local oServer, oTable, oRecord
|
||||
LOCAL cTok
|
||||
LOCAL cHostName := "localhost"
|
||||
LOCAL cUser := "root"
|
||||
LOCAL cPassWord := ""
|
||||
LOCAL cDataBase, cTable, cFile
|
||||
LOCAL aDbfStruct, i
|
||||
LOCAL lCreateTable := .F.
|
||||
LOCAL oServer, oTable, oRecord
|
||||
|
||||
SET CENTURY ON
|
||||
SET EPOCH TO 1960
|
||||
|
||||
// At present time (23/10/00) DBFCDX is default RDD and DBFNTX is
|
||||
// At present time (23/10/2000) DBFCDX is default RDD and DBFNTX is
|
||||
// now DBF (I mean the one able to handle .dbt-s :-))
|
||||
rddSetDefault( "DBF" )
|
||||
|
||||
if PCount() < 6
|
||||
IF PCount() < 6
|
||||
help()
|
||||
quit
|
||||
endif
|
||||
QUIT
|
||||
ENDIF
|
||||
|
||||
i := 1
|
||||
// Scan parameters and setup workings
|
||||
while (i <= PCount())
|
||||
WHILE i <= PCount()
|
||||
|
||||
cTok := hb_PValue(i++)
|
||||
cTok := hb_PValue( i ++ )
|
||||
|
||||
do case
|
||||
case cTok == "-h"
|
||||
cHostName := hb_PValue(i++)
|
||||
DO CASE
|
||||
CASE cTok == "-h"
|
||||
cHostName := hb_PValue( i ++ )
|
||||
|
||||
case cTok == "-d"
|
||||
cDataBase := hb_PValue(i++)
|
||||
CASE cTok == "-d"
|
||||
cDataBase := hb_PValue( i ++ )
|
||||
|
||||
case cTok == "-t"
|
||||
cTable := hb_PValue(i++)
|
||||
CASE cTok == "-t"
|
||||
cTable := hb_PValue( i ++ )
|
||||
|
||||
case cTok == "-f"
|
||||
cFile := hb_PValue(i++)
|
||||
CASE cTok == "-f"
|
||||
cFile := hb_PValue( i ++ )
|
||||
|
||||
case cTok == "-u"
|
||||
cUser := hb_PValue(i++)
|
||||
CASE cTok == "-u"
|
||||
cUser := hb_PValue( i ++ )
|
||||
|
||||
case cTok == "-p"
|
||||
cPassWord := hb_PValue(i++)
|
||||
CASE cTok == "-p"
|
||||
cPassWord := hb_PValue( i ++ )
|
||||
|
||||
case cTok == "-c"
|
||||
CASE cTok == "-c"
|
||||
lCreateTable := .T.
|
||||
|
||||
otherwise
|
||||
OTHERWISE
|
||||
help()
|
||||
quit
|
||||
endcase
|
||||
enddo
|
||||
QUIT
|
||||
ENDCASE
|
||||
ENDDO
|
||||
|
||||
dbUseArea(.T.,, cFile, "dbffile",, .T.)
|
||||
aDbfStruct := dbffile->(dbStruct())
|
||||
dbUseArea( .T. , , cFile, "dbffile", , .T. )
|
||||
aDbfStruct := dbffile -> ( dbStruct() )
|
||||
|
||||
oServer := TMySQLServer():New(cHostName, cUser, cPassWord)
|
||||
if oServer:NetErr()
|
||||
oServer := TMySQLServer():New( cHostName, cUser, cPassWord )
|
||||
IF oServer:NetErr()
|
||||
? oServer:Error()
|
||||
quit
|
||||
endif
|
||||
QUIT
|
||||
ENDIF
|
||||
|
||||
oServer:SelectDB(cDataBase)
|
||||
if oServer:NetErr()
|
||||
oServer:SelectDB( cDataBase )
|
||||
IF oServer:NetErr()
|
||||
? oServer:Error()
|
||||
quit
|
||||
endif
|
||||
QUIT
|
||||
ENDIF
|
||||
|
||||
if lCreateTable
|
||||
if Ascan(oServer:ListTables(), cTable) > 0
|
||||
oServer:DeleteTable(cTable)
|
||||
if oServer:NetErr()
|
||||
IF lCreateTable
|
||||
IF AScan( oServer:ListTables(), cTable ) > 0
|
||||
oServer:DeleteTable( cTable )
|
||||
IF oServer:NetErr()
|
||||
? oServer:Error()
|
||||
quit
|
||||
endif
|
||||
endif
|
||||
oServer:CreateTable(cTable, aDbfStruct)
|
||||
if oServer:NetErr()
|
||||
QUIT
|
||||
ENDIF
|
||||
ENDIF
|
||||
oServer:CreateTable( cTable, aDbfStruct )
|
||||
IF oServer:NetErr()
|
||||
? oServer:Error()
|
||||
quit
|
||||
endif
|
||||
endif
|
||||
QUIT
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
// Initialize MySQL table
|
||||
oTable := oServer:Query("SELECT * FROM " + cTable + " LIMIT 1")
|
||||
if oTable:NetErr()
|
||||
Alert(oTable:Error())
|
||||
quit
|
||||
endif
|
||||
oTable := oServer:Query( "SELECT * FROM " + cTable + " LIMIT 1" )
|
||||
IF oTable:NetErr()
|
||||
Alert( oTable:Error() )
|
||||
QUIT
|
||||
ENDIF
|
||||
|
||||
while !dbffile->(eof()) .AND. Inkey() != K_ESC
|
||||
WHILE !dbffile -> ( EOF() ) .AND. Inkey() != K_ESC
|
||||
|
||||
oRecord := oTable:GetBlankRow()
|
||||
|
||||
for i := 1 to dbffile->(FCount())
|
||||
oRecord:FieldPut(i, dbffile->(FieldGet(i)))
|
||||
for i := 1 TO dbffile -> ( FCount() )
|
||||
oRecord:FieldPut( i, dbffile -> ( FieldGet(i ) ) )
|
||||
next
|
||||
|
||||
oTable:Append(oRecord)
|
||||
if oTable:NetErr()
|
||||
Alert(oTable:Error())
|
||||
endif
|
||||
oTable:Append( oRecord )
|
||||
IF oTable:NetErr()
|
||||
Alert( oTable:Error() )
|
||||
ENDIF
|
||||
|
||||
dbffile->(dbSkip())
|
||||
dbffile -> ( dbSkip() )
|
||||
|
||||
DevPos(Row(), 1)
|
||||
if (dbffile->(RecNo()) % 100) == 0
|
||||
DevOut("imported recs: " + Str(dbffile->(RecNo())))
|
||||
endif
|
||||
enddo
|
||||
DevPos( Row(), 1 )
|
||||
IF ( dbffile -> ( RecNo() ) % 100 ) == 0
|
||||
DevOut( "imported recs: " + Str( dbffile -> (RecNo() ) ) )
|
||||
ENDIF
|
||||
ENDDO
|
||||
|
||||
dbffile->(dbCloseArea())
|
||||
dbffile -> ( dbCloseArea() )
|
||||
oTable:Destroy()
|
||||
oServer:Destroy()
|
||||
return
|
||||
|
||||
RETURN
|
||||
|
||||
procedure Help()
|
||||
PROCEDURE Help()
|
||||
|
||||
? "dbf2MySQL - dbf file to MySQL table conversion utility"
|
||||
? "-h hostname (default: localhost)"
|
||||
@@ -186,4 +185,4 @@ procedure Help()
|
||||
? "all parameters but -h -u -p -c are mandatory"
|
||||
? ""
|
||||
|
||||
return
|
||||
RETURN
|
||||
|
||||
@@ -77,7 +77,6 @@ PROCEDURE Main( ... )
|
||||
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
SET EPOCH TO 1960
|
||||
SET DELETE ON
|
||||
|
||||
rddSetDefault( "DBFDBT" )
|
||||
|
||||
@@ -23,11 +23,8 @@ PROCEDURE MAIN()
|
||||
{ "MYLOGIC", "L", 1, 0 } }
|
||||
LOCAL j, n := seconds(), nArea
|
||||
|
||||
// SET CENTURY ON
|
||||
// Automatically ON woth the following date format
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
SET( 4, ANSI )
|
||||
|
||||
// Set Trim On to RTRIM String Value of FieldGets
|
||||
// Default is OFF
|
||||
|
||||
@@ -38,22 +38,6 @@ PROCEDURE MAIN()
|
||||
*/
|
||||
SET DELETED ON
|
||||
|
||||
/*
|
||||
Determines the interpretation of date strings with only two year digits.
|
||||
When such a string is converted to a date value, its year digits are
|
||||
compared with the year digits of iBaseYear. If the year digits in the
|
||||
date are greater than or equal to the year digits of iBaseYear, the date
|
||||
is assumed to fall within the same century as iBaseYear. Otherwise,
|
||||
the date is assumed to fall in the following century.
|
||||
|
||||
iBaseYear specifies the base year of a 100-year period in which all dates
|
||||
containing only two year digits are assumed to fall.
|
||||
|
||||
The default epoch value is 1900, causing dates with no century digits
|
||||
to be interpreted as falling within the twentieth century.
|
||||
*/
|
||||
SET EPOCH 1950
|
||||
|
||||
/* Indicates whether or not Seeks are to return True if a partial key
|
||||
match is made. If True, key searches made with sx_Seek must match
|
||||
exactly in content and length. Partial key matches will result in
|
||||
|
||||
@@ -16,7 +16,8 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea
|
||||
LOCAL nIndex
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF FILE( "sixtest.nsx" )
|
||||
FERASE( "sixtest.nsx" )
|
||||
|
||||
@@ -17,7 +17,8 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea
|
||||
LOCAL nIndex
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF FILE( "myindex.nsx" )
|
||||
FERASE( "myindex.nsx" )
|
||||
|
||||
@@ -19,7 +19,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea
|
||||
LOCAL nIndex
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF FILE( "sixtest.nsx" )
|
||||
|
||||
@@ -22,7 +22,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
// This is the usual behaviour of NSX file
|
||||
|
||||
@@ -17,7 +17,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea
|
||||
LOCAL nIndex
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF FILE( "sixtest.nsx" )
|
||||
|
||||
@@ -23,7 +23,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
// This is the usual behaviour of NSX file
|
||||
|
||||
@@ -23,7 +23,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
// This is the usual behaviour of NSX file
|
||||
|
||||
@@ -15,7 +15,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea
|
||||
LOCAL nOrd
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF FILE( "sixtest.nsx" )
|
||||
|
||||
@@ -23,7 +23,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
// This is the usual behaviour of NSX file
|
||||
|
||||
@@ -22,7 +22,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENSX
|
||||
|
||||
@@ -22,7 +22,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENSX
|
||||
|
||||
@@ -22,7 +22,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENSX
|
||||
|
||||
@@ -24,7 +24,7 @@ PROCEDURE MAIN()
|
||||
|
||||
SET DELETED ON
|
||||
SET COMMITLEVEL 2
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENSX
|
||||
|
||||
@@ -24,7 +24,7 @@ PROCEDURE MAIN()
|
||||
|
||||
SET DELETED ON
|
||||
SET COMMITLEVEL 2
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENSX
|
||||
|
||||
@@ -22,7 +22,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor, nCount
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENSX
|
||||
|
||||
@@ -22,7 +22,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor, nCount
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENSX
|
||||
|
||||
@@ -21,7 +21,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor, nSum1, nSum2
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENSX
|
||||
|
||||
@@ -21,7 +21,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor, nAverage1, nAverage2
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENSX
|
||||
|
||||
@@ -21,7 +21,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL cApplication
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF File( "mytext.txt" )
|
||||
|
||||
@@ -22,7 +22,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor, nAverage1, nAverage2, cApplication
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF File( "mytext.txt" )
|
||||
|
||||
@@ -22,7 +22,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL nIndex, cOldColor, nAverage1, nAverage2, cApplication
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF File( "mytext.txt" )
|
||||
|
||||
@@ -21,7 +21,7 @@ PROCEDURE MAIN()
|
||||
{ "MYMEMO" , "M", 10, 0 } }
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF File( "mytext.txt" )
|
||||
|
||||
@@ -21,7 +21,7 @@ PROCEDURE MAIN()
|
||||
{ "MYMEMO" , "M", 10, 0 } }
|
||||
LOCAL j, aStructure
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF File( "mytext.txt" )
|
||||
|
||||
@@ -20,7 +20,7 @@ PROCEDURE MAIN()
|
||||
{ "MYNUMBER2" , "N", 8, 0 } }
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
IF File( "myText.Txt" )
|
||||
|
||||
@@ -19,7 +19,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds()
|
||||
|
||||
SX_RDDSETDEFAULT( "SDEFOX" )
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
?
|
||||
? 'Using APPEND BLANK 10000 ... Press any key ...'
|
||||
|
||||
@@ -21,7 +21,7 @@ PROCEDURE MAIN()
|
||||
{ "MYNUMBER2" , "N", 8, 0 } }
|
||||
|
||||
SX_RDDSETDEFAULT( "SDEFOX" )
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile1 STRUCT aStruct
|
||||
|
||||
@@ -21,7 +21,7 @@ PROCEDURE MAIN()
|
||||
{ "MYNUMBER2" , "N", 8, 0 } }
|
||||
|
||||
SX_RDDSETDEFAULT( "SDEFOX" )
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile1 STRUCT aStruct
|
||||
|
||||
@@ -29,7 +29,7 @@ PROCEDURE MAIN()
|
||||
{ "MYNUMBER2" , "N", 8, 0 } }
|
||||
|
||||
SX_RDDSETDEFAULT( "SDEFOX" )
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct
|
||||
|
||||
@@ -37,7 +37,7 @@ PROCEDURE MAIN()
|
||||
|
||||
SX_RDDSETDEFAULT( "SDEFOX" )
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile1 STRUCT aStruct1
|
||||
|
||||
@@ -23,7 +23,7 @@ PROCEDURE MAIN()
|
||||
|
||||
CLS
|
||||
SX_RDDSETDEFAULT( "SDEFOX" )
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
?
|
||||
|
||||
@@ -14,7 +14,7 @@ PROCEDURE MAIN()
|
||||
LOCAL cFile := "test\test.dbf"
|
||||
|
||||
SX_RDDSETDEFAULT( "SDEFOX" )
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
SX_COMMITLEVEL( 2 )
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ FUNCTION Test_1( nCommit )
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL cApplication
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENTX
|
||||
|
||||
@@ -71,7 +71,7 @@ FUNCTION Test_1( nCommit )
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL cApplication
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENTX
|
||||
|
||||
@@ -69,7 +69,7 @@ FUNCTION Test_1( nCommit )
|
||||
LOCAL j, n := seconds(), nArea, cPad
|
||||
LOCAL cApplication
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
CREATE DBF cFile STRUCT aStruct RDD SDENTX
|
||||
|
||||
@@ -23,9 +23,7 @@ PROCEDURE MAIN()
|
||||
LOCAL j, n := seconds(), nArea
|
||||
LOCAL aGet
|
||||
|
||||
// SET CENTURY ON
|
||||
// Automatically ON woth the following date format
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
// Set Trim On to RTRIM String Value of FieldGets
|
||||
|
||||
@@ -26,7 +26,7 @@ PROCEDURE MAIN()
|
||||
|
||||
// SET ERRORLEVEL 0
|
||||
SET RDD SDENSXDBT
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
SET TRIM ON
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ PROCEDURE MAIN()
|
||||
LOCAL aGet, nTagCount, aTagInfo
|
||||
|
||||
SET RDD SDEFOX
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
SET TRIM ON
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ PROCEDURE MAIN()
|
||||
LOCAL aGet, nTagCount, aTagInfo
|
||||
|
||||
SET RDD SDENTX
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
SET TRIM ON
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ PROCEDURE MAIN()
|
||||
LOCAL cGetRecord
|
||||
|
||||
SET RDD SDENTX
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
SET TRIM ON
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ PROCEDURE MAIN()
|
||||
{ "_SALARY", "N", 12, 0 } }
|
||||
LOCAL i, cPad
|
||||
|
||||
SET EPOCH 1950
|
||||
SET CENTURY ON
|
||||
SET DATE ANSI
|
||||
|
||||
// Making comma delimited dummy file to append to DBF file
|
||||
@@ -38,7 +38,7 @@ PROCEDURE MAIN()
|
||||
nHandle := FCreate( "testing.txt" )
|
||||
FOR i := 1 TO 100
|
||||
cPad := padl( i, 5, "0" )
|
||||
FWrite( nHAndle, "First_" + cPad + "," + "Last_" + cPad + "," + str( i * 2 ) + CHR( 13 ) + CHR( 10 ) )
|
||||
FWrite( nHAndle, "First_" + cPad + "," + "Last_" + cPad + "," + str( i * 2 ) + hb_eol() )
|
||||
NEXT
|
||||
FClose( nHandle )
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ PROCEDURE MAIN()
|
||||
{ "_SALARY", "N", 12, 0 } }
|
||||
LOCAL i, cPad
|
||||
|
||||
SET EPOCH 1950
|
||||
SET DATE ANSI
|
||||
SET CENTURY ON
|
||||
|
||||
// Making comma delimited dummy file to append to DBF file
|
||||
?
|
||||
@@ -38,7 +38,7 @@ PROCEDURE MAIN()
|
||||
nHandle := FCreate( "testing.txt" )
|
||||
FOR i := 1 TO 1000
|
||||
cPad := padl( i, 5, "0" )
|
||||
FWrite( nHAndle, "First_" + cPad + CHR( 9 ) + "Last_" + cPad + CHR( 9 ) + str( i * 2 ) + CHR( 13 ) + CHR( 10 ) )
|
||||
FWrite( nHAndle, "First_" + cPad + CHR( 9 ) + "Last_" + cPad + CHR( 9 ) + str( i * 2 ) + hb_eol() )
|
||||
NEXT
|
||||
FClose( nHandle )
|
||||
|
||||
|
||||
@@ -2151,14 +2151,13 @@ STATIC PROCEDURE Help()
|
||||
STATIC PROCEDURE SysSettings()
|
||||
SET SCOREBOARD OFF
|
||||
SET CENTURY ON
|
||||
SET DATE ITALIAN
|
||||
SET DATE ANSI
|
||||
SET BELL OFF
|
||||
SET DELETED ON
|
||||
SET EXACT OFF
|
||||
SET CONFIRM ON
|
||||
SET ESCAPE ON
|
||||
SET WRAP ON
|
||||
SET EPOCH TO 2000
|
||||
//RDDSetDefault( "DBFCDX" )
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ FUNCTION fsplit( csource, csplit, nbyte )
|
||||
|
||||
// y2k compliance
|
||||
SET DATE ANSI
|
||||
SET EPOCH TO Year( Date() ) - 50
|
||||
SET CENTURY ON
|
||||
|
||||
// no params passed
|
||||
IF PCount() == 0
|
||||
|
||||
Reference in New Issue
Block a user