|
-
Dec 30th, 2007, 08:53 AM
#1
Thread Starter
Addicted Member
How to create a transaction log
I have an Invoice program which I am working on. I want to know how to create an entry into another database after it saves the invoice to log the payment details in a seperate database. I have enclosed my code, no errors on debug, but no entries into the close-out database either.
Code:
Me.Validate()
Me.InvoicesBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.CloseoutsDataSet)
MessageBox.Show("Account Updated")
Me.TotalAmountTextBox.Text = SubtotalTextBox.Text
Me.TransactionAmountTextBox.Text = GrandTotalTextBox.Text
Me.PaymentTypeTextBox.Text = PaymentTypeComboBox.Text
Me.TransactionNoTextBox.Text = InvoiceNoTextBox.Text
Me.CloseoutsBindingSource.EndEdit()
Me.CloseoutsTableAdapter.Update(CloseoutsDataSet.Closeouts)
What in the world am I doing wrong? As you can see, I am updating two databases. One stores the details of the Invoice and the other logs the payments for Cashier Close-outs.
Thanks in advance!
-
Dec 30th, 2007, 02:57 PM
#2
Re: How to create a transaction log
 Originally Posted by DL1600
As you can see, I am updating two databases.
Where, and how, are you updating two databases with that code?
-
Dec 30th, 2007, 03:48 PM
#3
Re: How to create a transaction log
InvoicesBindingSource and CloseoutsBindingSource are your datagridviews?
You need to post more information/code.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 30th, 2007, 06:01 PM
#4
Re: How to create a transaction log
What value is returned by the CloseoutsTableAdapter.Update function? If it's zero then your DataTable simply doesn't contain and changes that can be saved by that adapter. If it's greater than zero then the changes are being saved. If you're not getting any exception thrown then those are the only two possibilities.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|