Dim ra As RandomAccessFile
ra.Initialize(File.DirDefaultExternal, "temp1.dat", False)
ra.WriteObject(AllServiceOperations, False, 0)
ra.Close
Dim os1 As OutputStream
Dim is1 As InputStream
is1 = File.OpenInput(File.DirDefaultExternal, "temp1.dat")
os1.InitializeToBytesArray(1000)
File.Copy2(is1, os1)
Dim bytes1() As Byte
bytes1 = os1.ToBytesArray
'ra.ReadBytes(bytes1, 0, bytes1.Length, 0)
sql1.ExecNonQuery2("UPDATE tblJobs SET all_operations=? WHERE device_job_id=?", Array As Object(bytes1, device_job_id))
File.Delete(File.DirDefaultExternal, "temp1.dat") ' deleting the temp file.