Page 1 of 1

Problem with FwMaria and oCn:BackUp

Posted: Thu Mar 06, 2025 11:33 am
by Maurizio
Hello,
I use the FwMaria backup program (vers.August-September 2024)

oCn:BackUp(cTable, cDestina )

With some databases this error occurs:

Code: Select all | Expand

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

Re: Problem with FwMaria and oCn:BackUp

Posted: Thu Mar 06, 2025 12:26 pm
by nageswaragunupudi
oCn:BackUp(cTable, cDestina )
Are you trying to backup single table "ctable" from currentDB() ?
If so, please try

Code: Select all | Expand

oCn:Backup( { cTable }, cDest )
and let us know if it works.

Re: Problem with FwMaria and oCn:BackUp

Posted: Thu Mar 06, 2025 1:45 pm
by Maurizio
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

Re: Problem with FwMaria and oCn:BackUp

Posted: Thu Mar 06, 2025 3:44 pm
by nageswaragunupudi
That indicates that for one or more of the tables in that database, the result of the query:

Code: Select all | Expand

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

Re: Problem with FwMaria and oCn:BackUp

Posted: Thu Mar 06, 2025 11:13 pm
by nageswaragunupudi
Please make a separate small exe and try:

Code: Select all | Expand

 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.

Re: Problem with FwMaria and oCn:BackUp

Posted: Fri Mar 07, 2025 8:38 am
by Maurizio
Rao ,

Code: Select all | Expand

::cError = "Table 'mastronipe.worksheet' doesn't exist"
but the table exists

Code: Select all | Expand

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 = ""	

Re: Problem with FwMaria and oCn:BackUp

Posted: Fri Mar 07, 2025 8:52 am
by nageswaragunupudi
Is your database name "mastronipe" ?
Is your code:

Code: Select all | Expand

oCn:Backup( "mastronipe", <cDest>)</code> 
?

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

Re: Problem with FwMaria and oCn:BackUp

Posted: Fri Mar 07, 2025 11:31 am
by Maurizio
? oCn:TableExists( "worksheet", "mastronipe", @cType )
Return .t.

? cType
Return BASE TABLE