NULL problem with Created table

  • Thread starter Thread starter JensB
  • Start date Start date
J

JensB

Hi
From vb.net I create a table with columns with this SQL:
strSQL = "Create Table tmpItems ([id] Counter,[ProgTexst] text(150)
Null,[PosNo] int Null,[PlcGroup] int Null,[LimitNo] int,[Machine]
YesNo,PRIMARY KEY(id)) "
The table is connected to a datagrid.
Everything works fine as long I am adding or changing values in the grid,
and use an
"UpdateCommand.ExecuteNonQuery()" on each cell change.
but the Update command fail with this error "Syntax error in UPDATE
statement".
when I do an Update command on an Int column and the value is Null.

Something wrong with the SQL?

Jens B
 
Solved the issue by changing the Update command to Null value, instead of
an empty string.
JensB
 
Back
Top