Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Copying a record and paste it using the same table

Posted on 2000-02-15
2
125 Views
Last Modified: 2010-04-04
I'm working on an invoicing system on Delphi5.
the invoice consist of mastertable and detailtable according to the law i can't delete an invoice.But deleting an invoice it means that i insert the same invoice under another invoice number. for example if i have an invoice with invoice nr. 5 if i delete it. it will remain under number 5 and it will take the invoice number 6 with negative amount so when i do vat statement they can see both one with positive amount and the other with negative one.
0
Comment
Question by:sivatagiherceg
2 Comments
 
LVL 6

Expert Comment

by:Jaymol
ID: 2522902
There's no question there mate!

John.
0
 
LVL 17

Accepted Solution

by:
geobul earned 10 total points
ID: 2523026
Hi,

Read values from current record like this:

FirstField := Table1.FieldByName('First').AsString;
.....

and then add a new record:

Table1.AppendRecord([FirstField,SecondField...]);

Note that the new record becomes current.

Regards, Geo
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question