Hey there!
Can anybody help me. I'm newbie in asm!
Does anybody know how to get 'long binary data' from database in asm.
In order to learn masm I started translating some of my VB programs
I should mention, this is MS ACCESS database.
best regards Johnny..
This is how I do it in VB.
Dim cnnImage As New ADODB.Connection
Dim rsImage As New ADODB.Recordset
rsImage.LockType = adLockOptimistic
rsImage.CursorType = adOpenKeyset
cnnImage.Provider = "Microsoft.Jet.OLEDB.4.0"
strSql = App.Path & "\data.mdb"
cnnImage.Open strSql
strSql = "SELECT * FROM Tabel1 WHERE id LIKE '" & filnavn & "'"
rsImage.Open strSql, cnnImage
Open "c:\temp\pictemp" For Binary Access Write As lngDataFile
lngLengh = rsImage!front.ActualSize
intChunks = lngLengh \ ChunkSize
intFragment = lngLengh Mod ChunkSize
ReDim Chunk(intFragment)
Chunk() = rsImage!front.GetChunk(intFragment)
Put lngDataFile, , Chunk()
For i = 1 To intChunks
ReDim Buffer(ChunkSize)
'Returns all or a portion of the contents of a large text or binary data Field object.
Chunk() = rsImage!front.GetChunk(ChunkSize)
'Write data to a Temp file
Put lngDataFile, , Chunk()
Next i
Close lngDataFile
Can anybody help me. I'm newbie in asm!
Does anybody know how to get 'long binary data' from database in asm.
In order to learn masm I started translating some of my VB programs
I should mention, this is MS ACCESS database.
best regards Johnny..
This is how I do it in VB.
Dim cnnImage As New ADODB.Connection
Dim rsImage As New ADODB.Recordset
rsImage.LockType = adLockOptimistic
rsImage.CursorType = adOpenKeyset
cnnImage.Provider = "Microsoft.Jet.OLEDB.4.0"
strSql = App.Path & "\data.mdb"
cnnImage.Open strSql
strSql = "SELECT * FROM Tabel1 WHERE id LIKE '" & filnavn & "'"
rsImage.Open strSql, cnnImage
Open "c:\temp\pictemp" For Binary Access Write As lngDataFile
lngLengh = rsImage!front.ActualSize
intChunks = lngLengh \ ChunkSize
intFragment = lngLengh Mod ChunkSize
ReDim Chunk(intFragment)
Chunk() = rsImage!front.GetChunk(intFragment)
Put lngDataFile, , Chunk()
For i = 1 To intChunks
ReDim Buffer(ChunkSize)
'Returns all or a portion of the contents of a large text or binary data Field object.
Chunk() = rsImage!front.GetChunk(ChunkSize)
'Write data to a Temp file
Put lngDataFile, , Chunk()
Next i
Close lngDataFile
Look for Iczelions ODBC tutorial (win32asm.cjb.net).