|
-
May 14th, 2001, 08:31 AM
#1
saving images in database
hello,
can any body suggest how to save the images in database alternative to append chunk mechanism and stream object..or using insert statement....
thanx
-
May 14th, 2001, 09:48 AM
#2
Re: saving images in database
Const MAX_PATH = 255
private Const CHUNK_SIZE = 1000
private Declare Function GetTempPath Lib "kernel32" _
Alias "GetTempPathA" (byval nBufferLength as Long, _byval lpBuffer as string) as Long
public Function SavePictureToDB(PictControl as Object, _
RS as Object, FieldName as string) as Boolean
'PURPOSE: SAVES PICTURE IN IMAGEBOX, PICTUREBOX, OR SIMILAR
'CONTROL to RECORDSET RS IN FIELD NAME FIELDNAME
'FIELD TYPE MUST BE binary (OLE OBJECT IN ACCESS)
'SAMPLE USAGE
'Dim sConn as string
'Dim oConn as new ADODB.Connection
'Dim oRs as new ADODB.Recordset''
'sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDb.MDB;Persist Security Info=false"'
'oConn.Open sConn
'oRs.Open "SELECT * FROM MYTABLE", oConn, adOpenKeyset, _
adLockOptimistic
'oRs.AddNew
'SavePictureToDB Picture1, oRs, "MYFIELD"
'oRs.Update
'oRs.Close
Iouri Boutchkine
[email protected]
-
May 17th, 2001, 09:53 AM
#3
Re: saving images in database
I have problem to save files in DB field. Can you tell me how to use stream object and can it help me. I looking for help but not found.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|