T
Tom Luetz II
I'm having some trouble with the DataAdapter in my code. When the parameter
in an OleDbCommand, which is created
as having a type of OleDbType.Decimal, is set to System.DbNull, the actual
value posted to the database upon execution of the Insert command is a
floating point value of zero (0.0, actually).
The DataAdapter is associated with a DataGrid. When a row is inserted into
the grid, the column may contain either nothing "(null)"
or a floating point value.
Here's some excerpts from the code that may help someone help me with this:
DAdapter = New OleDbDataAdapter
'Build insert command
CommandText = "Insert into db.threshold threshd_critical) values (?)"
DAdapter.InsertCommand = New OleDbCommand(CommandText, mConnection)
'Define parameters for insert command
workParam = DAdapter.InsertCommand.Parameters.Add("threshd_critical",
OleDbType.Decimal)
workParam.SourceColumn = "threshd_critical"
workParam.SourceVersion = DataRowVersion.Current
Any assistance would be greatly appreciated!
Tom
in an OleDbCommand, which is created
as having a type of OleDbType.Decimal, is set to System.DbNull, the actual
value posted to the database upon execution of the Insert command is a
floating point value of zero (0.0, actually).
The DataAdapter is associated with a DataGrid. When a row is inserted into
the grid, the column may contain either nothing "(null)"
or a floating point value.
Here's some excerpts from the code that may help someone help me with this:
DAdapter = New OleDbDataAdapter
'Build insert command
CommandText = "Insert into db.threshold threshd_critical) values (?)"
DAdapter.InsertCommand = New OleDbCommand(CommandText, mConnection)
'Define parameters for insert command
workParam = DAdapter.InsertCommand.Parameters.Add("threshd_critical",
OleDbType.Decimal)
workParam.SourceColumn = "threshd_critical"
workParam.SourceVersion = DataRowVersion.Current
Any assistance would be greatly appreciated!
Tom