R
rosiew
I am having problems setting a field in my database to null. I tried
to follow some online advise on using a DataSet for setting the value
but I am gettting an error and not sure what I am doing wrong.
My table has only one row and no primary key. The "Frequency" field
is numeric and allows null input.
Dim daFreqs As OleDbDataAdapter
Dim ds As New DataSet()
daFreqs = New OleDbDataAdapter("SELECT * FROM AcDF_Frequency",
AcDF_Conn)
daFreqs.Fill(ds)
ds.Tables(0).Rows(0)("Frequency") = System.DBNull.Value
daFreqs.Update(ds)
I get the following error:
Update requires a valid UpdateCommand when passed DataRow collection
with modified rows.
to follow some online advise on using a DataSet for setting the value
but I am gettting an error and not sure what I am doing wrong.
My table has only one row and no primary key. The "Frequency" field
is numeric and allows null input.
Dim daFreqs As OleDbDataAdapter
Dim ds As New DataSet()
daFreqs = New OleDbDataAdapter("SELECT * FROM AcDF_Frequency",
AcDF_Conn)
daFreqs.Fill(ds)
ds.Tables(0).Rows(0)("Frequency") = System.DBNull.Value
daFreqs.Update(ds)
I get the following error:
Update requires a valid UpdateCommand when passed DataRow collection
with modified rows.