Showing posts with label displays. Show all posts
Showing posts with label displays. Show all posts

Friday, March 23, 2012

Image data type to character string

I have a table with an image datatype field.

When I retrieve it it displays as a binary array. How do I convert that array back and forth to get the underlying text?

Post the SQL statement used in this regard, you need to use READTEXT statement, also http://www.codeproject.com/cs/database/ImageSaveInDataBase.asp fyi..

If you are using any application to display that image column then refer to http://www.akadia.com/services/dotnet_load_blob.html link for more information.

Wednesday, March 21, 2012

image files

I've uploaded a gif file to RS using Reports Manager, but when I go to view
the image in RS/RM, it does not display. Only a red X displays.
I'm using RS 2000 with Form based authentication.
Please Help!!!!On Mar 13, 2:56 pm, Nikki <N...@.discussions.microsoft.com> wrote:
> I've uploaded a gif file to RS using Reports Manager, but when I go to view
> the image in RS/RM, it does not display. Only a red X displays.
> I'm using RS 2000 with Form based authentication.
> Please Help!!!!
I would suggest embedding the image in the report itself. Hope this
helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||how do I embed an image?
"EMartinez" wrote:
> On Mar 13, 2:56 pm, Nikki <N...@.discussions.microsoft.com> wrote:
> > I've uploaded a gif file to RS using Reports Manager, but when I go to view
> > the image in RS/RM, it does not display. Only a red X displays.
> >
> > I'm using RS 2000 with Form based authentication.
> >
> > Please Help!!!!
> I would suggest embedding the image in the report itself. Hope this
> helps.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>

Image does not display on report

I have a simple report that has nothing but an image. The image is part of the project. The image displays in the VS 2005 dev environment when report is previewed. But when deployed and run on the report server website, it does not display. If the report is print previewed or exported to Excel, the image displays. I've set my browser to have the least security as possible but still to no avail (made the website trusted as well). The server is running SQL Server 2005 SP2. My browser is IE7. Can anyone please help? Thanks.

Found the problem. The report didn't like that the 5.25" x 1.5" image was being fit into a 1.5" x 0.5" area. When I made the image smaller, it was displaying fine. Sorry for the trouble.

Image does not display

Hi post,
I have created a simple report using VS.net with an embeded image.
when I open the report from my PC the image displays well not a problem.Also
for any users this works fine.
My PC name is "Personal1"
Report server exists on Server: "Server1"
url used to access this Report is http://Server1.gar.abc.com/Reports
BUT the problem is
When I access this report from other servers(Personal2,Personal3 etc)
it does not display image(Or it display missing image icon).
Can someone suggest the cause and problem.
thanks
-aslamSolved this problem from the link
http://www.codeproject.com/useritems/RenderStreamImages.asp
-aslam
"replyaslam" wrote:
> Hi post,
> I have created a simple report using VS.net with an embeded image.
> when I open the report from my PC the image displays well not a problem.Also
> for any users this works fine.
> My PC name is "Personal1"
> Report server exists on Server: "Server1"
> url used to access this Report is http://Server1.gar.abc.com/Reports
> BUT the problem is
> When I access this report from other servers(Personal2,Personal3 etc)
> it does not display image(Or it display missing image icon).
> Can someone suggest the cause and problem.
> thanks
> -aslamsql

Image data type to character string

I have a table with an image datatype field.

When I retrieve it it displays as a binary array. How do I convert that array back and forth to get the underlying text?

Post the SQL statement used in this regard, you need to use READTEXT statement, also http://www.codeproject.com/cs/database/ImageSaveInDataBase.asp fyi..

If you are using any application to display that image column then refer to http://www.akadia.com/services/dotnet_load_blob.html link for more information.

Image Data

What is the correct (or best way) to
Insert Into an Image data field.
I have an app that displays records containing Equipment Pictures.
I am able to display the record and display the picture.
I want to allow the user to add an new record and also insert a
new picture associated with the record.
The table was imported so the existing pictures came in fine
but I now need to build the app to facilitate this needed
functionality.
any help is much appreciated.
thanks in advance,
bob mcclellanYou can store the physical path of the pictures in one column and it is
better to hide that file
Madhivanan|||One of the option is this script wriiten by (If I remember well) Dan Guzman
Dim ADOCmd As New ADODB.Command
Dim ADOprm As New ADODB.Parameter
Dim ADOcon As ADODB.Connection
Dim intFile As Integer
Dim ImgBuff() As Byte
Dim ImgLen As Long
Set ADOcon = New ADODB.Connection
With ADOcon
.Provider = "MSDASQL"
.CursorLocation = adUseClient
.ConnectionString = "driver=
{SQL Server};server=(local);uid=<username>;pwd=<strong
password>;database=pubs"
.Open
End With
'Change this to the path of a GIF file you want to use for testing.
IMG_FILE_GIF = "E:\Graphics\GIF\Image.gif"
'Read/Store GIF file in ByteArray
intFile = FreeFile
Open IMG_FILE_GIF For Binary As #intFile
ImgLen = LOF(intFile)
ReDim ImgBuff(ImgLen) As Byte
Get #intFile, , ImgBuff()
Close #intFile
Set ADOCmd.ActiveConnection = ADOcon
ADOCmd.CommandType = adCmdStoredProc
ADOCmd.CommandText = "uspInsertBLOB"
Set ADOprm = ADOCmd.CreateParameter(, adChar, adParamInput, 1, "1")
ADOCmd.Parameters.Append ADOprm
'The datatype must be specified as adLongVarBinary
'For the code to function correctly comment this line.
Set ADOprm = ADOCmd.CreateParameter(, adLongVarBinary, _
adParamInput, ImgLen)
'Uncomment this line.
'Set ADOprm = ADOCmd.CreateParameter(, adLongVarBinary, _
adParamInput, (ImgLen + 1))
ADOCmd.Parameters.Append ADOprm
'Set the Value of the parameter with the AppendChunk method.
ADOprm.AppendChunk ImgBuff()
'The preceding example assumes you are using a small image file.
'See the article reference in the REFERENCES section for handling a
'large image file.
ADOCmd.Execute
Set ADOCmd = Nothing
Set ADOprm = Nothing
"John316" <bobmcc@.tricoequipment.com> wrote in message
news:O5XzhRmHFHA.3588@.TK2MSFTNGP14.phx.gbl...
> What is the correct (or best way) to
> Insert Into an Image data field.
> I have an app that displays records containing Equipment Pictures.
> I am able to display the record and display the picture.
> I want to allow the user to add an new record and also insert a
> new picture associated with the record.
> The table was imported so the existing pictures came in fine
> but I now need to build the app to facilitate this needed
> functionality.
> any help is much appreciated.
> thanks in advance,
> bob mcclellan
>|||Thanks Uri !
I will try this out.
thanks much for the reply.
It is much appreciated.
bob
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:O89CQdmHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> One of the option is this script wriiten by (If I remember well) Dan
> Guzman
> Dim ADOCmd As New ADODB.Command
> Dim ADOprm As New ADODB.Parameter
> Dim ADOcon As ADODB.Connection
> Dim intFile As Integer
> Dim ImgBuff() As Byte
> Dim ImgLen As Long
> Set ADOcon = New ADODB.Connection
> With ADOcon
> .Provider = "MSDASQL"
> .CursorLocation = adUseClient
> .ConnectionString = "driver=
> {SQL Server};server=(local);uid=<username>;pwd=<strong
> password>;database=pubs"
> .Open
> End With
> 'Change this to the path of a GIF file you want to use for testing.
> IMG_FILE_GIF = "E:\Graphics\GIF\Image.gif"
> 'Read/Store GIF file in ByteArray
> intFile = FreeFile
> Open IMG_FILE_GIF For Binary As #intFile
> ImgLen = LOF(intFile)
> ReDim ImgBuff(ImgLen) As Byte
> Get #intFile, , ImgBuff()
> Close #intFile
> Set ADOCmd.ActiveConnection = ADOcon
> ADOCmd.CommandType = adCmdStoredProc
> ADOCmd.CommandText = "uspInsertBLOB"
> Set ADOprm = ADOCmd.CreateParameter(, adChar, adParamInput, 1, "1")
> ADOCmd.Parameters.Append ADOprm
> 'The datatype must be specified as adLongVarBinary
> 'For the code to function correctly comment this line.
> Set ADOprm = ADOCmd.CreateParameter(, adLongVarBinary, _
> adParamInput, ImgLen)
> 'Uncomment this line.
> 'Set ADOprm = ADOCmd.CreateParameter(, adLongVarBinary, _
> adParamInput, (ImgLen + 1))
> ADOCmd.Parameters.Append ADOprm
> 'Set the Value of the parameter with the AppendChunk method.
> ADOprm.AppendChunk ImgBuff()
> 'The preceding example assumes you are using a small image file.
> 'See the article reference in the REFERENCES section for handling a
> 'large image file.
> ADOCmd.Execute
> Set ADOCmd = Nothing
> Set ADOprm = Nothing
>
> "John316" <bobmcc@.tricoequipment.com> wrote in message
> news:O5XzhRmHFHA.3588@.TK2MSFTNGP14.phx.gbl...
>