In my Xharbour application which is quite big, some of my code does not work, it looks like:
If I run the code from scratch, then it works, but when I integrated it in my Xharbour application is does not work.
Anybody an idea why this is?
Part of the code looks like:
The above code is based on the code of http://wiki.fivetechsoft.com/doku.php?i ... ortfromdbf.
note: The rest of the codes works perfectly, such as, if a customer table is in mysql then it works.
FW_AdoImportFromDBF( oCn,"C:\Pieter\dir1\TEST\customer.dbf")If I run the code from scratch, then it works, but when I integrated it in my Xharbour application is does not work.
Anybody an idea why this is?
Part of the code looks like:
FUNCTION DBF2SQL()
local oRs
//CreateDatabaseIfNotYetExist()
ConnectWithDatabase() //this connection with a mysql database works fine.
MsgInfo( "import customer.dbf" )
MsgInfo( File("C:\Pieter\dir1\TEST\customer.dbf") ) //gives T
FW_AdoImportFromDBF( oCn,"C:\Pieter\dir1\TEST\customer.dbf")
oRs = TRecSet():New():Open( "customer", oCn )
if oRs:IsOpen()
XBROWSER oRs // SETUP oBrw:lIncrFilter := .T.
// SETUP oBrw:bEdit := { | oRec | MyEdit( oRec ) }
// SETUP oBrw:lIncrSearch := .T.
// SETUP oBrw:lWildSeek := .T.
oRs:Close()
else
MsgAlert( "The recordset could not be opened" )
MsgInfo( "Check that you have REQUEST DBFCDX" )
endif
CloseDatabase()
RETURN MsgInfo( "END.." )
FUNCTION CloseDatabase()
oCn:Close()
RETURN NILThe above code is based on the code of http://wiki.fivetechsoft.com/doku.php?i ... ortfromdbf.
note: The rest of the codes works perfectly, such as
oRs = TRecSet():New():Open( "customer", oCn )