Click here to Skip to main content
15,898,819 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Comparing Two (Time) Text Fields Pin
J4amieC18-Oct-04 22:47
J4amieC18-Oct-04 22:47 
Generalselecting items in ListBox Pin
Nadroj18-Oct-04 16:55
Nadroj18-Oct-04 16:55 
GeneralRe: selecting items in ListBox Pin
J4amieC18-Oct-04 22:43
J4amieC18-Oct-04 22:43 
GeneralRe: selecting items in ListBox Pin
Nadroj19-Oct-04 17:06
Nadroj19-Oct-04 17:06 
GeneralTrying to update record using OleDb Pin
bexarcounty18-Oct-04 11:08
bexarcounty18-Oct-04 11:08 
GeneralRe: Trying to update record using OleDb Pin
Desi Bravo22-Oct-04 7:05
Desi Bravo22-Oct-04 7:05 
GeneralRe: Trying to update record using OleDb Pin
bexarcounty25-Oct-04 3:05
bexarcounty25-Oct-04 3:05 
GeneralRe: Trying to update record using OleDb Pin
Anonymous25-Oct-04 7:01
Anonymous25-Oct-04 7:01 
This is what I currently have in my program on the update button:
It's only an example of the Contacts program.

Try
Me.BindingContext(dsContact, _
"tblContacts").EndCurrentEdit()
odaContacts.Update(dsContacts, _
"tblContacts")
Catch eSave As System.Exception
MessageBox.Show(eSave.Message)
End Try

Me.dsContacts_PositionChanged()

ReadOnlyOn()
End Sub

Now when using the DataForm wizard it will generate the entire form and coding where you don't have to do any coding, and update button clearly
updates the records perfectly. But the coding is different. So if you try
it manually with that same code it will not work unless you follow the
specified instructions of the wizard in order to get the program working.

This is what the wizard generate on the update button_Click event:

Try
'Attempt to update the datasource.
Me.UpdateDataSet()
Catch eUpdate As System.Exception
'Add your error handling code here.
'Display error message, if any.
System.Windows.Forms.MessageBox.Show(eUpdate.Message)
End Try
Me.objMyAddresses_PositionChanged()

And this address book program works like a charm, it adds records, deletes, updates, navigate back and forward to the first and last.


This is another program using the update button:

OledbDataAdapter1.Update(DataSet11.students)
DataSet11.Clear()
OledbDataAdapter1.Fill(DataSet11)
End Sub

Let me know if it works on the update button.
Remember that you must use the same context when you create the generate dataset.

GeneralRe: Trying to update record using OleDb Pin
Desi Bravo25-Oct-04 7:07
Desi Bravo25-Oct-04 7:07 
GeneralVisual Basic and Microsoft Access Pin
underb@asd20.org18-Oct-04 10:07
underb@asd20.org18-Oct-04 10:07 
GeneralRe: Visual Basic and Microsoft Access Pin
Desi Bravo25-Oct-04 7:14
Desi Bravo25-Oct-04 7:14 
Generalmask in column of datagrid Pin
Britnt718-Oct-04 8:06
Britnt718-Oct-04 8:06 
GeneralRe: mask in column of datagrid Pin
Desi Bravo25-Oct-04 7:48
Desi Bravo25-Oct-04 7:48 
GeneralRe: mask in column of datagrid Pin
Britnt725-Oct-04 8:21
Britnt725-Oct-04 8:21 
GeneralRe: mask in column of datagrid Pin
Desi Bravo26-Oct-04 11:52
Desi Bravo26-Oct-04 11:52 
GeneralRe: mask in column of datagrid Pin
Desi Bravo1-Nov-04 13:04
Desi Bravo1-Nov-04 13:04 
GeneralRe: mask in column of datagrid Pin
Britnt72-Nov-04 2:09
Britnt72-Nov-04 2:09 
GeneralIssues with aysynchronous socket! Pin
Anonymous18-Oct-04 6:09
Anonymous18-Oct-04 6:09 
GeneralRe: Issues with aysynchronous socket! Pin
Anonymous21-Oct-04 6:17
Anonymous21-Oct-04 6:17 
GeneralPassing an array of struct as arguments in vb.net Pin
randynamics17-Oct-04 22:56
randynamics17-Oct-04 22:56 
QuestionHow to use a datagrid or flexgrid for user input Pin
gamerPotatoe17-Oct-04 20:52
gamerPotatoe17-Oct-04 20:52 
GeneralExecuting equations (.NET) Pin
Nic Rowan17-Oct-04 20:44
Nic Rowan17-Oct-04 20:44 
GeneralRe: Executing equations (.NET) Pin
Colin Angus Mackay17-Oct-04 21:11
Colin Angus Mackay17-Oct-04 21:11 
GeneralRe: Executing equations (.NET) Pin
Nic Rowan17-Oct-04 21:33
Nic Rowan17-Oct-04 21:33 
Generalimport xml file to database Pin
Anonymous17-Oct-04 19:58
Anonymous17-Oct-04 19:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.