G
Guest
When I execute the following (with an OleDBDataAdapter),
wanting to add a row to a visual foxpro table:
myrow= datasetTarget.Tables(0).NewRow
'fill all columns here like..
row(i)= myvalue
' then
datasetTarget.Tables(0).Rows.Add(myrow)
dataAdapterTarget.Update(datasetTarget.Tables(0)) '*
I get "Invalid cast from system.byte to system.byte[]"
exception.message executing the * marked line, when I use
row(i)=cbyte(1).
I get the message "ColumnName does not accept null values"
when I use row(i)=b ', where dim b as system.byte =
{12,13,14}
Assigning other data types like integer, double, even with
cbyte(..) gives similar errors.
The failing column is from a Visual Foxpro table (to which
I connected via an OledbDataAdapter, using vfpoledb.dll
ver 8.0.0.2521).
The trouble column is not nullable. Its VFP data type is
'General', as shown by the VFP ver 6 IDE Table Designer.
I cannot change the type of the column (it's not my table).
So what do I assign to row(i) in this case if I want to
leave it empty
(in case of a string type I would assign row(i)="").
This column is supposed to store bit images from icons, but
I need to fill this column with nothing, not having any
icon bitmaps.
This problem appears only when the VFP datatype is
'General'; otherwise my column filling algorithm works.
TIA
wanting to add a row to a visual foxpro table:
myrow= datasetTarget.Tables(0).NewRow
'fill all columns here like..
row(i)= myvalue
' then
datasetTarget.Tables(0).Rows.Add(myrow)
dataAdapterTarget.Update(datasetTarget.Tables(0)) '*
I get "Invalid cast from system.byte to system.byte[]"
exception.message executing the * marked line, when I use
row(i)=cbyte(1).
I get the message "ColumnName does not accept null values"
when I use row(i)=b ', where dim b as system.byte =
{12,13,14}
Assigning other data types like integer, double, even with
cbyte(..) gives similar errors.
The failing column is from a Visual Foxpro table (to which
I connected via an OledbDataAdapter, using vfpoledb.dll
ver 8.0.0.2521).
The trouble column is not nullable. Its VFP data type is
'General', as shown by the VFP ver 6 IDE Table Designer.
I cannot change the type of the column (it's not my table).
So what do I assign to row(i) in this case if I want to
leave it empty
(in case of a string type I would assign row(i)="").
This column is supposed to store bit images from icons, but
I need to fill this column with nothing, not having any
icon bitmaps.
This problem appears only when the VFP datatype is
'General'; otherwise my column filling algorithm works.
TIA