I have a memory stream that i would like to save to an sql2000 database and
then retreave it later on. I currently have the field set as an sql2000 ->
VarBinary type of field. Any suggestions in vb.net??? When i run the
current code i get an: "An unhandled exception of type
'System.Invalid CastException' occurred in system.data.dll - Additional
information: Object must implement IConvertible" error.
Dim Str As New System.IO.Memor yStream
GridView1.SaveL ayoutToStream(S tr)
Str.Seek(0, System.IO.SeekO rigin.Begin)
Dim myRow As DataRow
Me.daPGMGridVie ws.Fill(Me.Data Set11.tblPgmGri dViews)
If Me.DataSet11.tb lPgmGridViews.R ows.Count = 0 Then
myRow = Me.DataSet11.tb lPgmGridViews.N ewRow
myRow("GridView Binary") = Str
Me.DataSet11.tb lPgmGridViews.R ows.Add(myRow)
Else
myRow = Me.DataSet11.tb lPgmGridViews.R ows(0)
myRow("GridView Binary") = Str
End If
Me.daPGMGridVie ws.Update(Me.Da taSet11.tblPgmG ridViews)
Thanks for your help!
Chris Thunell
cthunell@pierce associates.com
Comment