Database question
Database question
What would be a secure way to append a small database ( < 1000 records) to a journal dbf file and
then delete the small database.
Thank in advance
Otto
then delete the small database.
Thank in advance
Otto
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
-
- Posts: 167
- Joined: Thu Mar 22, 2007 11:24 am
Otto ,
To append safely records i use :
To append safely records i use :
Code: Select all
FUNCTION APND(lAdd)
*************
LOCAL cAlias := Alias()
DEFAULT Toevoegen := .F.
DO WHILE .T.
//APPEND BLANK
(cAlias)->(DBAPPEND(! lAdd))
IF ! (cAlias)->(NETERR())
RETU .T.
ELSE
IF msgNoYes("Not appended. Try again (5 sec) ?")
MtrWait("Wait 5 sec","Append again")
ELSE
RETU .F.
END
END
END
RETU .T.
********************************************
proc mtrWait(cMessage,cTitle,nSec)
***************************************
// Wait with oMeter
MsgMeter( { | oMeter, oText, oDlg, lEnd | ;
TestMMt( oMeter, oText, oDlg, @lEnd , nSec ) },;
cMessage , cTitle )
RETURN
function TestMMT( oMeter, oText, oDlg, lEnd , nSec )
*****************************************************
LOCAL start := seconds()
DEFAULT nSec := 5
oMeter:nTotal = nSec //seconds()
DO WHIL seconds() < start + nSec
EVAL({||oMeter:Set(seconds()-start ) , SysRefresh(), ! lEnd })
END
return nil
Thank you for sharing.
We have a ECR program. There the consumption of a guest is stored in a single dbf file. I the guest checks out the dbf file is added to the file where the sales volume of the whole day is stored.
The question is:
How to be secure that the whole file is imported?
And if something goes wrong to do a roll back in automatic mode.
Regards,
Otto
We have a ECR program. There the consumption of a guest is stored in a single dbf file. I the guest checks out the dbf file is added to the file where the sales volume of the whole day is stored.
The question is:
How to be secure that the whole file is imported?
And if something goes wrong to do a roll back in automatic mode.
Regards,
Otto
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Does someone use the Transaction Processing System (TPS) from
Advantage database server?
Regards,
Otto
A Transaction Processing System (TPS) allow an application to perform multiple insert, update, and delete operations to any number of tables with complete confidence that either all of the insert, update, and delete operations will be successful or that none of the operations will occur. In other words, a TPS processes multiple insertions, updates, and deletions as though they were a single operation.
In networked environments, tables and their associated index files are susceptible to corruption if a workstation crashes or a network failure occurs while the tables and index files are being updated. Building an audit trail to monitor these failures is difficult. Developing a method to recover from incomplete updates is even more difficult. Transaction Processing Systems eliminate these problems and protect database integrity by automatically undoing any updates that were performed in the event of workstation or network failure. This leaves a database exactly as it was before a transaction began.
Transaction Processing is not supported in the Advantage Local Server. Use of Advantage Transaction Processing functionality may appear to complete successfully when using Advantage Local Server, but in fact, use of Transaction Processing features will be ignored by Advantage Local Server applications.
See Transaction Processing System (TPS) for a full explanation of the Transaction Processing System available in the Advantage Database Server.
The Advantage Database Server provides the powerful features of a Transaction Processing System (TPS) for your Advantage applications. Advantage TPS allows an application to perform multiple insert, update, and delete operations to any number of tables with complete confidence that either all of the insert, update, and delete operations will be successful or that none of the operations will occur. In other words, Advantage TPS processes multiple insertions, updates, and deletions as though they were a single operation.
Advantage database server?
Regards,
Otto
A Transaction Processing System (TPS) allow an application to perform multiple insert, update, and delete operations to any number of tables with complete confidence that either all of the insert, update, and delete operations will be successful or that none of the operations will occur. In other words, a TPS processes multiple insertions, updates, and deletions as though they were a single operation.
In networked environments, tables and their associated index files are susceptible to corruption if a workstation crashes or a network failure occurs while the tables and index files are being updated. Building an audit trail to monitor these failures is difficult. Developing a method to recover from incomplete updates is even more difficult. Transaction Processing Systems eliminate these problems and protect database integrity by automatically undoing any updates that were performed in the event of workstation or network failure. This leaves a database exactly as it was before a transaction began.
Transaction Processing is not supported in the Advantage Local Server. Use of Advantage Transaction Processing functionality may appear to complete successfully when using Advantage Local Server, but in fact, use of Transaction Processing features will be ignored by Advantage Local Server applications.
See Transaction Processing System (TPS) for a full explanation of the Transaction Processing System available in the Advantage Database Server.
The Advantage Database Server provides the powerful features of a Transaction Processing System (TPS) for your Advantage applications. Advantage TPS allows an application to perform multiple insert, update, and delete operations to any number of tables with complete confidence that either all of the insert, update, and delete operations will be successful or that none of the operations will occur. In other words, Advantage TPS processes multiple insertions, updates, and deletions as though they were a single operation.
-
- Posts: 1033
- Joined: Fri Oct 07, 2005 3:33 pm
- Location: Cochabamba - Bolivia
Otto,
TPS work good in ADS, but only in ADS server version, this is main differnece between LOCAL and Server version of ADS, and TPS work only if the record affected in the transaction are locked
regards
Marcelo
TPS work good in ADS, but only in ADS server version, this is main differnece between LOCAL and Server version of ADS, and TPS work only if the record affected in the transaction are locked
regards
Marcelo
Otto wrote:Does someone use the Transaction Processing System (TPS) from
Advantage database server?
Regards,
Otto
A Transaction Processing System (TPS) allow an application to perform multiple insert, update, and delete operations to any number of tables with complete confidence that either all of the insert, update, and delete operations will be successful or that none of the operations will occur. In other words, a TPS processes multiple insertions, updates, and deletions as though they were a single operation.
In networked environments, tables and their associated index files are susceptible to corruption if a workstation crashes or a network failure occurs while the tables and index files are being updated. Building an audit trail to monitor these failures is difficult. Developing a method to recover from incomplete updates is even more difficult. Transaction Processing Systems eliminate these problems and protect database integrity by automatically undoing any updates that were performed in the event of workstation or network failure. This leaves a database exactly as it was before a transaction began.
Transaction Processing is not supported in the Advantage Local Server. Use of Advantage Transaction Processing functionality may appear to complete successfully when using Advantage Local Server, but in fact, use of Transaction Processing features will be ignored by Advantage Local Server applications.
See Transaction Processing System (TPS) for a full explanation of the Transaction Processing System available in the Advantage Database Server.
The Advantage Database Server provides the powerful features of a Transaction Processing System (TPS) for your Advantage applications. Advantage TPS allows an application to perform multiple insert, update, and delete operations to any number of tables with complete confidence that either all of the insert, update, and delete operations will be successful or that none of the operations will occur. In other words, Advantage TPS processes multiple insertions, updates, and deletions as though they were a single operation.
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
> I really don't see any problem.
Please google for:
transaction concepts database
Transaction concepts are one of the main problems of database handling. Therefore dbf files are substituted more and more though SQL tables in bigger applications. There you have start transaction end transaction and roll back.
Here a good starting point:
http://www.cs.utexas.edu/users/dahlin/C ... Gray81.pdf
Please see what ADS says about this:
In networked environments, tables and their associated index files are susceptible to corruption if a workstation crashes or a network failure occurs while the tables and index files are being updated. Building an audit trail to monitor these failures is difficult. Developing a method to recover from incomplete updates is even more difficult. Transaction Processing Systems eliminate these problems and protect database integrity by automatically undoing any updates that were performed in the event of workstation or network failure. This leaves a database exactly as it was before a transaction began.
Please google for:
transaction concepts database
Transaction concepts are one of the main problems of database handling. Therefore dbf files are substituted more and more though SQL tables in bigger applications. There you have start transaction end transaction and roll back.
Here a good starting point:
http://www.cs.utexas.edu/users/dahlin/C ... Gray81.pdf
Please see what ADS says about this:
In networked environments, tables and their associated index files are susceptible to corruption if a workstation crashes or a network failure occurs while the tables and index files are being updated. Building an audit trail to monitor these failures is difficult. Developing a method to recover from incomplete updates is even more difficult. Transaction Processing Systems eliminate these problems and protect database integrity by automatically undoing any updates that were performed in the event of workstation or network failure. This leaves a database exactly as it was before a transaction began.
-
- Posts: 1033
- Joined: Fri Oct 07, 2005 3:33 pm
- Location: Cochabamba - Bolivia