Hi all..
I have converted text document to blob(binary large objects) in an
array binaryArray [], now the data needs to be saved in database table
'Dokumet'
The following code does not save the binary array in the database
field 'Document'.. dont know whats wrong..
im new to vb.net and datasets..
kindly help me!
Dim len As Integer
Dim fs As FileStream = New FileStream(File Name,
FileMode.OpenOr Create, FileAccess.Read )
len = CInt(fs.Length) ' convert from long to type int
Dim binaryArray() As Byte = New Byte(len - 1) {}
fs.Read(binaryA rray, 0, len)
fs.Close()
'---- check code
Dim name As String
name = "af"
Dim tdsDocumentObj As New tdsDocument.Dok umentDataTable
Dim something As tdsDocument.Dok umentRow = Nothing
something = tdsDocumentObj. NewDokumentRow
something.Docum ent = (binaryArray)
tdsDocumentObj. AcceptChanges()
I have converted text document to blob(binary large objects) in an
array binaryArray [], now the data needs to be saved in database table
'Dokumet'
The following code does not save the binary array in the database
field 'Document'.. dont know whats wrong..
im new to vb.net and datasets..
kindly help me!
Dim len As Integer
Dim fs As FileStream = New FileStream(File Name,
FileMode.OpenOr Create, FileAccess.Read )
len = CInt(fs.Length) ' convert from long to type int
Dim binaryArray() As Byte = New Byte(len - 1) {}
fs.Read(binaryA rray, 0, len)
fs.Close()
'---- check code
Dim name As String
name = "af"
Dim tdsDocumentObj As New tdsDocument.Dok umentDataTable
Dim something As tdsDocument.Dok umentRow = Nothing
something = tdsDocumentObj. NewDokumentRow
something.Docum ent = (binaryArray)
tdsDocumentObj. AcceptChanges()
Comment