Problem with FwMaria and oCn:BackUp

Post Reply
User avatar
Maurizio
Posts: 832
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Problem with FwMaria and oCn:BackUp

Post 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
User avatar
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Problem with FwMaria and oCn:BackUp

Post 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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Maurizio
Posts: 832
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Re: Problem with FwMaria and oCn:BackUp

Post 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
User avatar
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Problem with FwMaria and oCn:BackUp

Post 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
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Problem with FwMaria and oCn:BackUp

Post 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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Maurizio
Posts: 832
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Re: Problem with FwMaria and oCn:BackUp

Post 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 = ""	
User avatar
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Problem with FwMaria and oCn:BackUp

Post 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
Regards

G. N. Rao.
Hyderabad, India
User avatar
Maurizio
Posts: 832
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Re: Problem with FwMaria and oCn:BackUp

Post by Maurizio »

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

? cType
Return BASE TABLE
Post Reply