Windows Develop Bookmark and Share   
 index > Windows Forms General > VB2008 MDI Application connected SQL server 2005 via ODBC
 

VB2008 MDI Application connected SQL server 2005 via ODBC

I have a MDI App. connected to SQL Server 2005 database via ODBC, and there are two forms in MDI Parent form, called form1 & form2, both of the forms are contain a datagrid.

The problem that I have when try to save data from datagrid, enven thus, it says the data saved, but there are no data have been saved,and this is an intermittent problem.

Thank you,

BVN
BVN2002  Monday, June 22, 2009 5:12 PM
Problem Solved, thank you
BVN2002  Tuesday, July 07, 2009 3:31 PM
Hi BVN2002,

Would you please post the code on how you update the DataGridView? Did you try to capture the exception which Database Operation might throw?

Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Wednesday, June 24, 2009 8:59 AM

Private

Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'DataSet1.PatientInfo' table. You can move, or remove it, as needed.
Me.PatientInfoTableAdapter.Fill(Me.DataSet1.PatientInfo)
End Sub


Private

Sub SaveDataToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveDataToolStripMenuItem.Click

Me.Validate()
M
e.PatientInfoBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.DataSet1)

End
Sub

The code above are in my form,

Thank you Bruce,

BVN
BVN2002  Wednesday, June 24, 2009 12:47 PM
Hi BVN2002,

There is no problem with this code as they are generated by the designer. As I can see from your initial post, the application prompts you data is saved. Can you tell me where you get this information?

Best regards,
Bruce Zhou

Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Wednesday, June 24, 2009 1:10 PM
We are changing the issue type to “Comment�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.
Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Monday, June 29, 2009 11:41 AM
Problem Solved, thank you
BVN2002  Tuesday, July 07, 2009 3:31 PM
Thank you for letting me know your problem got solved.

Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Wednesday, July 08, 2009 2:19 AM

You can use google to search for other answers

Custom Search

More Threads

• How to set background color of dialog box using Win32 API
• IShellItemImageFactory doesn't producing images on DISK CLEANUP with Thumbnails.
• DataGridView - functionality
• TreeView - Keep selected Node selected when losing focus
• How to record screen?
• owner draw scroll bar...
• Border Color for TablelayoutPanel
• OpenFileDialog Multiselect problem
• how to link particular words in TextBox
• Expansion of a node when mouse is on + sign of that node