It looks like you're new here. If you want to get involved, click one of these buttons!
Imports System.data
Imports System.IO
Imports System.Data.OleDb
Public Class Form1
Private bindMgr As BindingManagerBase
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'SurveyDataSet1.Survey' table. You can move, or remove it, as needed.
Me.SurveyTableAdapter.Fill(Me.SurveyDataSet1.Survey)
'TODO: This line of code loads data into the 'SurveyDataSet.Survey' table. You can move, or remove it, as needed.
Me.SurveyTableAdapter.Fill(Me.SurveyDataSet.Survey)
'TODO: This line of code loads data into the 'SurveyDataSet.Survey' table. You can move, or remove it, as needed.
bindMgr = MyBase.BindingContext(SurveyDataSet, "survey")
Me.SurveyTableAdapter.Fill(Me.SurveyDataSet.Survey)
'TODO: This line of code loads data into the 'SurveyDataSet.Survey' table. You can move, or remove it, as needed.
Me.SurveyTableAdapter.Fill(Me.SurveyDataSet.Survey)
'TODO: This line of code loads data into the 'SurveyDataSet.Survey' table. You can move, or remove it, as needed.
Me.SurveyTableAdapter.Fill(Me.SurveyDataSet.Survey)
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
Try
Me.SurveyBindingSource.EndEdit()
Me.SurveyTableAdapter.Update(Me.SurveyDataSet.Survey)
MessageBox.Show("Database was updated")
Me.SurveyTableAdapter.Fill(Me.SurveyDataSet.Survey)
Catch ex As Exception
MessageBox.Show("Problem updating database")
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
bindMgr.Position -= 1
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
bindMgr.Position += 1
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Try
Me.BindingSource1.EndEdit()
Me.SurveyTableAdapter.Update(Me.SurveyDataSet.Survey)
MessageBox.Show("Database was updated")
Me.SurveyTableAdapter.Fill(Me.SurveyDataSet.Survey)
Catch ex As Exception
MessageBox.Show("Problem updating database")
End Try
End Sub
Private Sub TableLayoutPanel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)
End Sub
End Class
Comments
Good luck dealing with Microsoft bs.
Yeah its a school project that I am trying to go a little further on but I hit a dead end. Were working with databases in VB.net and all I had to use Access for was to set up the table originally.
Edit:
Looks like I'm going to have to read up more on ADO I'll get back to you on this.