Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / August 2005

Tip: Looking for answers? Try searching our database.

Sql Table with image field type

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fredrick A. Zilz - 18 Aug 2005 17:13 GMT
I have read a number of articles and still think I am missing something.

I have a sql table with IDs and Image files of users signatures for signing Access reports as they are printed to PDF docs.   I stored them in the sql database for security and to have the project contained within the database file and the adp file.  So I would prefer not to use links.  Using a .net windows app I can save to the table and display the images in the windows app.  I use:
Dim userdat As New IHInv
Dim dr As DataRow
Dim abyt() As Byte
Dim i As Integer
i = CType(cmbBoxSign.SelectedValue, Integer)
dr = userdat.getSign(i).Rows(0)
Try
abyt = CType(dr.Item("Signature"), Byte())
Dim ms As New MemoryStream(abyt)
PictureBox1.Image = Image.FromStream(ms)
Catch
End Try
For an access report can I use memory stream?  Is there a similar technique for MS access 2003?  

Looking for some assistance.

Thanks

Fred
Fredrick A. Zilz - 18 Aug 2005 20:58 GMT
I have seen a couple examples using ADO 2.5  with ADODB.stream but when I try dim s as adodb.stream or dim s as stream, I get an error "user-defined type not defined.

 I have read a number of articles and still think I am missing something.

 I have a sql table with IDs and Image files of users signatures for signing Access reports as they are printed to PDF docs.   I stored them in the sql database for security and to have the project contained within the database file and the adp file.  So I would prefer not to use links.  Using a .net windows app I can save to the table and display the images in the windows app.  I use:
 Dim userdat As New IHInv
 Dim dr As DataRow
 Dim abyt() As Byte
 Dim i As Integer
 i = CType(cmbBoxSign.SelectedValue, Integer)
 dr = userdat.getSign(i).Rows(0)
 Try
 abyt = CType(dr.Item("Signature"), Byte())
 Dim ms As New MemoryStream(abyt)
 PictureBox1.Image = Image.FromStream(ms)
 Catch
 End Try
 For an access report can I use memory stream?  Is there a similar technique for MS access 2003?  

 Looking for some assistance.

 Thanks

 Fred
Fredrick A. Zilz - 18 Aug 2005 22:20 GMT
I got adodb.stream to work, I just was missing a few references in my project.
 I have seen a couple examples using ADO 2.5  with ADODB.stream but when I try dim s as adodb.stream or dim s as stream, I get an error "user-defined type not defined.

   "Fredrick A. Zilz" <fzilz@NOSPAM.interhealthusa.com> wrote in message news:%232JWX9ApFHA.2444@tk2msftngp13.phx.gbl...
   I have read a number of articles and still think I am missing something.

   I have a sql table with IDs and Image files of users signatures for signing Access reports as they are printed to PDF docs.   I stored them in the sql database for security and to have the project contained within the database file and the adp file.  So I would prefer not to use links.  Using a .net windows app I can save to the table and display the images in the windows app.  I use:
   Dim userdat As New IHInv
   Dim dr As DataRow
   Dim abyt() As Byte
   Dim i As Integer
   i = CType(cmbBoxSign.SelectedValue, Integer)
   dr = userdat.getSign(i).Rows(0)
   Try
   abyt = CType(dr.Item("Signature"), Byte())
   Dim ms As New MemoryStream(abyt)
   PictureBox1.Image = Image.FromStream(ms)
   Catch
   End Try
   For an access report can I use memory stream?  Is there a similar technique for MS access 2003?  

   Looking for some assistance.

   Thanks

   Fred
Ricardo Hernández Sáez - 18 Aug 2005 22:37 GMT
   you can find an example here
http://accessbuho.mvps.org/ficheros/Imagenes_En_BD.zip

   The documentation is in spanish, but the code is the code ;-)

   The example combines resources from Eduardo A. Morcillo and Stephen Lebans.

   Includes a ".tlb" developed by E. Morcillo to use Gdiplus.dll. This let us to create an StdPicture from a stream.

   then, i use lebans's functions to convert this StdPicture to a Metafile

Dim stp As StdPicture

Dim imageBytes() As Byte

Set rs = New ADODB.Recordset

rs.Open "Select * From Objetos Where .", CurrentProject.Connection, .

imageBytes = rs!Objeto

Set stp = basEdanmo.LoadImage(imageBytes)

Call basStdPic.fStdPicToImageData(stp, me.CtlImagen0, False)

   

 I have read a number of articles and still think I am missing something.

 I have a sql table with IDs and Image files of users signatures for signing Access reports as they are printed to PDF docs.   I stored them in the sql database for security and to have the project contained within the database file and the adp file.  So I would prefer not to use links.  Using a .net windows app I can save to the table and display the images in the windows app.  I use:
 Dim userdat As New IHInv
 Dim dr As DataRow
 Dim abyt() As Byte
 Dim i As Integer
 i = CType(cmbBoxSign.SelectedValue, Integer)
 dr = userdat.getSign(i).Rows(0)
 Try
 abyt = CType(dr.Item("Signature"), Byte())
 Dim ms As New MemoryStream(abyt)
 PictureBox1.Image = Image.FromStream(ms)
 Catch
 End Try
 For an access report can I use memory stream?  Is there a similar technique for MS access 2003?  

 Looking for some assistance.

 Thanks

 Fred
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.