M
Mark
I'm using the following code to update my DataSet and
then update the datasource, a SQL Server 2000 database.
The code runs without throwing the error. However, when I
look at my SQL DB Table all of the decimals that I
attempted to pass into it have been stored as a 0. The
strings are passing fine.
Is there something that I'm missing? The SQL Table
has decimal(18,4). The variables are good as I'm using
them in calculations with no problem.
Can someone point me in the right direction? Thanks.
Try
Dim newRow As DataRow = DsPlate.TblPlate.NewRow
newRow("PlateNum") = txtPlateNum.Text
newRow("SubVal") = decSubVal
newRow("hbKitNum") = strHBKitNum
newRow("EXPKit") = strExpKit
newRow("ConKit") = strConKit
newRow("EXPCon") = strExpCon
newRow("NCal1") = decNCal1
newRow("NCal2") = decNCal2
newRow("NCal3") = decNCal3
newRow("PCACon") = decPCACon
newRow("PCBCon") = decPCBCon
newRow("PCATest") = decPCATest
newRow("PCBTest") = decPCBTest
newRow("ExNegConA") = decExNegConA
newRow("ExNegConB") = decExNegConB
newRow("ExPosConA") = decExPosConA
newRow("ExPosConB") = decExPosConB
newRow("ExPosTestA") = decExPosTestA
newRow("ExPosTestB") = decExPosTestB
newRow("Ncalx") = decNCalx
newRow("Cutoff") = decCutoff
newRow("Confirmed") = strPlateConfirm
DsPlate.TblPlate.Rows.Add(newRow)
SQLDA.Update(DsPlate, "TBLPlate")
Catch ex As Exception
MessageBox.Show("There has been an error
saving the data.", "Data Entry Error",
MessageBoxButtons.OK, _
MessageBoxIcon.Stop)
End Try
then update the datasource, a SQL Server 2000 database.
The code runs without throwing the error. However, when I
look at my SQL DB Table all of the decimals that I
attempted to pass into it have been stored as a 0. The
strings are passing fine.
Is there something that I'm missing? The SQL Table
has decimal(18,4). The variables are good as I'm using
them in calculations with no problem.
Can someone point me in the right direction? Thanks.
Try
Dim newRow As DataRow = DsPlate.TblPlate.NewRow
newRow("PlateNum") = txtPlateNum.Text
newRow("SubVal") = decSubVal
newRow("hbKitNum") = strHBKitNum
newRow("EXPKit") = strExpKit
newRow("ConKit") = strConKit
newRow("EXPCon") = strExpCon
newRow("NCal1") = decNCal1
newRow("NCal2") = decNCal2
newRow("NCal3") = decNCal3
newRow("PCACon") = decPCACon
newRow("PCBCon") = decPCBCon
newRow("PCATest") = decPCATest
newRow("PCBTest") = decPCBTest
newRow("ExNegConA") = decExNegConA
newRow("ExNegConB") = decExNegConB
newRow("ExPosConA") = decExPosConA
newRow("ExPosConB") = decExPosConB
newRow("ExPosTestA") = decExPosTestA
newRow("ExPosTestB") = decExPosTestB
newRow("Ncalx") = decNCalx
newRow("Cutoff") = decCutoff
newRow("Confirmed") = strPlateConfirm
DsPlate.TblPlate.Rows.Add(newRow)
SQLDA.Update(DsPlate, "TBLPlate")
Catch ex As Exception
MessageBox.Show("There has been an error
saving the data.", "Data Entry Error",
MessageBoxButtons.OK, _
MessageBoxIcon.Stop)
End Try