FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with FwMaria and oCn:BackUp
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Problem with FwMaria and oCn:BackUp
Posted: Thu Mar 06, 2025 11:33 AM
Hello,
I use the FwMaria backup program (vers.August-September 2024)

oCn:BackUp(cTable, cDestina )

With some databases this error occurs:
Stack Calls
===========
   Called from: backupsql.prg => AEVAL( 0 )
   Called from: .\source\internal\fwmaria.prg => FWMARIACONNECTION:BACKUPTABLE( 9754 )
   Called from: .\source\internal\fwmaria.prg => FWMARIACONNECTION:BACKUP( 9652 )


with other databases it works fine

Regards Maurizio
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with FwMaria and oCn:BackUp
Posted: Thu Mar 06, 2025 12:26 PM
oCn:BackUp(cTable, cDestina )
Are you trying to backup single table "ctable" from currentDB() ?
If so, please try
oCn:Backup( { cTable }, cDest )
and let us know if it works.
Regards



G. N. Rao.

Hyderabad, India
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: Problem with FwMaria and oCn:BackUp
Posted: Thu Mar 06, 2025 01:45 PM
Ciao RAO

happy to hear from you again. :D

No, I didn't explain myself well, I copy the entire database not individual tables .
oCn:Backup( cDataBase , cDest )

or
oCn:Backup( cDataBase , cDest ,bAction )

Maurizio
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with FwMaria and oCn:BackUp
Posted: Thu Mar 06, 2025 03:44 PM
That indicates that for one or more of the tables in that database, the result of the query:
aCols := ::Execute( "SHOW FULL COLUMNS FROM " + cTable )
is not return an array but nil or other value.
I need to find that table and see what to do.
Though this is a rare case, we have to fix this in our library code.

By an chance, do you have the database in the cloud?
If not, I will suggest you some other way.

Your cooperation will help us to improve our library
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with FwMaria and oCn:BackUp
Posted: Thu Mar 06, 2025 11:13 PM
Please make a separate small exe and try:
 oCn := maria_Connect( ... )
oCn:lShowErrors := .t.
oCn:lLogErr := .t.
oCn:BackUp( <db>, <dst> )
? "done"
return nil
Please let me know if you see any errors before the above AEVAL(0) error.
Also this creates a log file with the same name as the exe file. Let us also see the log file.
Regards



G. N. Rao.

Hyderabad, India
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: Problem with FwMaria and oCn:BackUp
Posted: Fri Mar 07, 2025 08:38 AM
Rao ,
::cError = "Table 'mastronipe.worksheet' doesn't exist"
but the table exists

03/07/25 09:21:44: FWMARIACONNECTION:EXECUTE_SQL( 6791 )	
cCallStack( "<-", 3 ) = "FWMARIACONNECTION:EXECUTE( 7163 )
<-FWMARIACONNECTION:BACKUPTABLE( 9752 )
<-FWMARIACONNECTION:BACKUP( 9652 )
<-COPIA_1( 239 )
<-(b)COPIA( 137 )
<-(b)MSGMETERX( 410 )
<-(b)TDIALOG( 99 )<-TDIALOG:DISPLAY( 0 )
<-TDIALOG:HANDLEEVENT( 1208 )
<-DIALOGBOXINDIRECT( 0 )
<-TDIALOG:ACTIVATE( 309 )
<-MSGMETERX( 415 )
<-COPIA( 140 )
<-MAIN( 114 )"	cSql = "SHOW FULL COLUMNS FROM `worksheet`"	
uRet = 	::nError = 1146	
::cError = "Table 'mastronipe.worksheet' doesn't exist"	
::cSqlInfo = ""	
03/07/25 09:26:37: FWMARIACONNECTION:EXECUTE_SQL( 6791 )	
cCallStack( "<-", 3 ) = "FWMARIACONNECTION:EXECUTE( 7163 )<-FWMARIACONNECTION:BACKUPTABLE( 9752 )
<-FWMARIACONNECTION:BACKUP( 9652 )<-COPIA_1( 239 )<-(b)COPIA( 137 )<-(b)MSGMETERX( 410 )<-(b)TDIALOG( 99 )<-TDIALOG:DISPLAY( 0 )<-TDIALOG:HANDLEEVENT( 1208 )<-DIALOGBOXINDIRECT( 0 )<-TDIALOG:ACTIVATE( 309 )<-MSGMETERX( 415 )<-COPIA( 140 )<-MAIN( 114 )"	cSql = "SHOW FULL COLUMNS FROM `worksheet`"	uRet = 	::nError = 1146	::cError = "Table 'mastronipe.worksheet' doesn't exist"	::cSqlInfo = ""
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with FwMaria and oCn:BackUp
Posted: Fri Mar 07, 2025 08:52 AM
Is your database name "mastronipe" ?
Is your code:
oCn:Backup( "mastronipe", <cDest>)</code> 
?

Also what is the result of 
[code]cType := nil
? oCn:TableExists( "worksheet", "mastronipe", @cType )
? cType
Regards



G. N. Rao.

Hyderabad, India
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: Problem with FwMaria and oCn:BackUp
Posted: Fri Mar 07, 2025 11:31 AM

? oCn:TableExists( "worksheet", "mastronipe", @cType )

Return .t.

? cType

Return BASE TABLE

Continue the discussion