E
.-=] ExTrEmE [=-.
Hi all!
I need an help for a stupid thing.. sorry but I'm a newbie on .net.
- Access 2007 DB is connected by wizard (CustomersSheetsDadaSet)
- Each table has insert,update,delete,select commands in sql defined at
design time (customers, invoices, payments)
- I've a small amount of textboxes, datetimepicker and so on *unbounded*.
The problem is very simple: no record where added to the database
I fill all the required data, then press a button that add the new record to
invoices table in the DB.
No errors, no exeptions, nothing.. but no new record into the db
I simply try to add the record with:
Try
InvoicesTableAdapter.Insert(*all my fields*)
Catch ex As exception
msgbox("Bad",ex.message)
End Try
No error.. but no new record
I've made a second test with these lines of code (obviously with no result
):
Dim NewInvoice As CustomersSheetsDadaSet.FattureRow
NewInvoice = CustomersSheetsDadaSet.Fatture.NewRow
NewInvoice.CustomerCode = ElencoFornitori.SelectedValue 'List bounded with
customers table
NewInvoice.InvoiceNumber = txtNumeroFattura.Text
NewInvoice.EmissionDate = dtpDataEmissione.Value
NewInvoice.ExpireOn = dtpDataScadenza.Value
NewInvoice.Euros = txtImporto.Text
NewInvoice.Description = txtDescrizione.Text
CustomersSheetsDadaSet.Invoices.Rows.Add(NewInvoice)
CustomersSheetsDadaSet.Invoices.DataSet.AcceptChanges()
I don't know what I need to do.
Can you help me?
Thanks.
I need an help for a stupid thing.. sorry but I'm a newbie on .net.
- Access 2007 DB is connected by wizard (CustomersSheetsDadaSet)
- Each table has insert,update,delete,select commands in sql defined at
design time (customers, invoices, payments)
- I've a small amount of textboxes, datetimepicker and so on *unbounded*.
The problem is very simple: no record where added to the database
I fill all the required data, then press a button that add the new record to
invoices table in the DB.
No errors, no exeptions, nothing.. but no new record into the db
I simply try to add the record with:
Try
InvoicesTableAdapter.Insert(*all my fields*)
Catch ex As exception
msgbox("Bad",ex.message)
End Try
No error.. but no new record
I've made a second test with these lines of code (obviously with no result
):
Dim NewInvoice As CustomersSheetsDadaSet.FattureRow
NewInvoice = CustomersSheetsDadaSet.Fatture.NewRow
NewInvoice.CustomerCode = ElencoFornitori.SelectedValue 'List bounded with
customers table
NewInvoice.InvoiceNumber = txtNumeroFattura.Text
NewInvoice.EmissionDate = dtpDataEmissione.Value
NewInvoice.ExpireOn = dtpDataScadenza.Value
NewInvoice.Euros = txtImporto.Text
NewInvoice.Description = txtDescrizione.Text
CustomersSheetsDadaSet.Invoices.Rows.Add(NewInvoice)
CustomersSheetsDadaSet.Invoices.DataSet.AcceptChanges()
I don't know what I need to do.
Can you help me?
Thanks.