Hello,
I am a very very basic programmer and I have been struggling with a problem witing data to a database. I am building a machine that is communicating through a serial connection to a process meter. I am retrieving this data, plotting on a chart and hopefully recording it to a db that I created with VB2005 Express. The problem I am having is that I create a new row with all my data as described in a MSDN help topic but nothing seems to be saved to the DB file. Here is the code... Do I need to update the dataset somehow?
Public Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Dim newMeasurementRow As InsideShoeDBDataSet.MeasurementRow
newMeasurementRow = InsideShoeDBDataSet1.Measurement.NewMeasurementRow()
newMeasurementRow._Date = date1
newMeasurementRow.Time = time1
newMeasurementRow.Style = style
newMeasurementRow.Model = model
newMeasurementRow.Gender = gender
newMeasurementRow.Size = length
newMeasurementRow.Width = width1
newMeasurementRow.Last = last
newMeasurementRow.Measurement1 = actual
newMeasurementRow.Measurement2 = actual
newMeasurementRow.Measurement3 = actual
newMeasurementRow.Measurement4 = actual
newMeasurementRow.Measurement5 = actual
newMeasurementRow.Measurement6 = actual
newMeasurementRow.Measurement7 = actual
newMeasurementRow.Measurement8 = actual
newMeasurementRow.Measurement9 = actual
newMeasurementRow.Measurement10 = actual
InsideShoeDBDataSet1.Measurement.Rows.Add(newMeasurementRow)
End Sub
I appreciate any help....
Billy
I am a very very basic programmer and I have been struggling with a problem witing data to a database. I am building a machine that is communicating through a serial connection to a process meter. I am retrieving this data, plotting on a chart and hopefully recording it to a db that I created with VB2005 Express. The problem I am having is that I create a new row with all my data as described in a MSDN help topic but nothing seems to be saved to the DB file. Here is the code... Do I need to update the dataset somehow?
Public Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Dim newMeasurementRow As InsideShoeDBDataSet.MeasurementRow
newMeasurementRow = InsideShoeDBDataSet1.Measurement.NewMeasurementRow()
newMeasurementRow._Date = date1
newMeasurementRow.Time = time1
newMeasurementRow.Style = style
newMeasurementRow.Model = model
newMeasurementRow.Gender = gender
newMeasurementRow.Size = length
newMeasurementRow.Width = width1
newMeasurementRow.Last = last
newMeasurementRow.Measurement1 = actual
newMeasurementRow.Measurement2 = actual
newMeasurementRow.Measurement3 = actual
newMeasurementRow.Measurement4 = actual
newMeasurementRow.Measurement5 = actual
newMeasurementRow.Measurement6 = actual
newMeasurementRow.Measurement7 = actual
newMeasurementRow.Measurement8 = actual
newMeasurementRow.Measurement9 = actual
newMeasurementRow.Measurement10 = actual
InsideShoeDBDataSet1.Measurement.Rows.Add(newMeasurementRow)
End Sub
I appreciate any help....
Billy