import image from database 
Author Message
 import image from database
I have a table in MSSQL with a Image datatype field
I want to import this image into a powerpoint presentation / Word document
(say in a macro - this would be the same code for word and powerpoint I
gather)
is this possible?

My current code being

    Dim rs As ADODB.Recordset
    Dim sqlstr As String
    Dim dsn As String

    Set rs = New ADODB.Recordset
    dsn = "dsn=webpro;uid=startweb;pwd="
    sqlstr = "SELECT img_data FROM theImage WHERE img_pk=12"

    With rs
        .CursorType = adOpenForwardOnly
        .LockType = adLockReadOnly
        .Open Source:=sqlstr, _
                        ActiveConnection:=dsn, _
                        Options:=adCmdText
'HERE PUT INTO MACRO .Fields("img_data")  'this is a SQL IMAGE datatype
        .Close
    End With

I know in ASP one can use <img tags and response.binarywrite,
and I have tried record a macro but how to insert an image from a database?
converting the binary img_data to some picture format?

it should be possible, should'nt it?

Thomas Roberg




Sun, 01 Aug 2004 21:06:10 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Importing Word doc into Access database or Oracle database

2. Importing Word doc into Access database or Oracle database

3. importing databases into an existing database

4. How to display image from mbd database in an Image Control

5. Moving an image stored in a database to an image/picture control

6. OLE-Importing image from the clipboard

7. OLE - importing images from the clipboard

8. import image from scanner or digital camera

9. How to import high res images in Visual Basic

10. Importing Images(Icons)

11. Import Image File

12. Import Access 2000 OLE image into VB

 

 
Powered by phpBB® Forum Software