Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Monday, March 26, 2012

Images - Store in a database or file system?

I have recently designed and built my first database using SQL server 2005 express. I have included an image (BLOB) column in one of the database tables. This is a bad idea according to some experts, and some say it is OK!

I am currently carrying out a trial with just 3 pictures via Visual Basic 2005 express forms, and there is no problem so far as the images are displayed for each record. But I anticipate between 300 - 1000 images for the table, and this could pose real problems for SQL server 2005 express and Visual Basic 2005 express, I guess.

I have just been reading that the cost of storing large images in the database is too high! I have also read it's better to store images (BLOB) into the file system because it is cheaper to store them no matter how many there are.

But the question is how I can reference an image in this path: C:\Picture\Product\Grocery\00052745.jpg in the database table, so that when I select a record Visual Basic 2005 forms the image is displayed accordingly, similar as when stored directly in the database table? Your help very much appreciated.

hi Paul,

PaulN wrote:

I have recently designed and built my first database using SQL server 2005 express. I have included an image (BLOB) column in one of the database tables. This is a bad idea according to some experts, and some say it is OK!

yes, this often result in "religious wars" bewteen parts.. I'm with the "all in the db" part , with just one caveat (regarding MSDE and SQLExpress), depending on the "limited" database maximum size of 2gb for MSDE and 4gb for SQLExpress.. this obviously could "limit" the quantity and size of the lobs stored in the database, thus penalizing an architecture of a project..

well.. 4gb are not that "limited" if you store little jpges, but could eventually become a real limit if you have to store a "tipycal" ripped movie of about 700mb..

I am currently carrying out a trial with just 3 pictures via Visual Basic 2005 express forms, and there is no problem so far as the images are displayed for each record. But I anticipate between 300 - 1000 images for the table, and this could pose real problems for SQL server 2005 express and Visual Basic 2005 express, I guess.

actually that's not that bad... it's real a "limited" quantity you should not have problem with..

I have just been reading that the cost of storing large images in the database is too high! I have also read it's better to store images (BLOB) into the file system because it is cheaper to store them no matter how many there are.

this is true.. standard disk space is absolutely cheap. but you incour in other kind of problems.. see later..

But the question is how I can reference an image in this path: C:\Picture\Product\Grocery\00052745.jpg in the database table, so that when I select a record Visual Basic 2005 forms the image is displayed accordingly, similar as when stored directly in the database table? Your help very much appreciated.

thi is the problem with "external" resources... I mean that it's a traditional scenario for this kind of stuff, but this includes an important access tradeoff.. if you have "all your things" within the database, you only need to query it for returning the desired output (including the lob's data).. all is incapsulated within the database... you do not have "particular" security problems as your database permissions schema already includes lobs.. on the contrary, if your "table" just stores the "path" to the actual lob jpeg file, that file should be available among the whole lan (if your scenario involves remote connections), meaning it must reside on a "share" where all potential (remote) users can access it, with read-only and/or read/write permissions on it (depending on the nature) in order to allow both access (read) and modifications (write)...

more, all the automated tasks as you already pointed out are out of scope, you have to load pictures from a stream loaded with the lob's data from the (remote) folder... this last part is not that bad (streaming data), but all the remaining part is (accessing physical NTFS permissions, share, and disk subsystem), IMVHO...

I do prefer to streams lob's data out of a (say) datareader object anyway from the database not directly relying on wizard's bindings as usually data have to be "purged/checked" before presentation (but this is not mandatory, it depends on your design and the actual prj), but all remains "incapsulated" in the db... just a few stored procedures to read/write data in and out and the job is done...

regards|||

I agree with Andrea.

For small photos, store them in the database. You won't 'lose' photos quite as easily as if they are just 'floating' around the file system somewhere. And backups are much easier.

However, if I were dealing with something like a Contract Photo Agency, with hundreds of thousands of photos, in high resolution (meaning multi-MB photo/file sizes), I would investigate something like 'FileNET', or other of the content management 'systems'.

|||Another good ressource is: To blob or not to blob: http://research.microsoft.com/research/pubs/view.aspx?msr_tr_id=MSR-TR-2006-45

Jens K. Suessmeyer.

http://www.sqlserver2005.de
sql

image size

Hello

I added a background jpg file into my report. It seems the image is bigger then my page size, is there any way I can say fit the image size to page size?

Sounds like your image is huge! Why not make a smaller image and do a repeating background?

Background Image Repeat

You can have a background image repeat vertically (y), horizontally (x), in both directions, or in neither direction.

CSS Code:

p {
background-image: url(smallPic.jpg);
background-repeat: repeat; }
p {
background-image: url(smallPic.jpg);
background-repeat: repeat-y; }
p {
background-image: url(smallPic.jpg);
background-repeat: repeat-x; }
p {
background-image: url(smallPic.jpg);
background-repeat: no-repeat; }

Image size

I have a SQL database that stores image files (pdf, doc, tif etc). Is it
possible to write a query that shows the size of the file being stored ?
Any help would be great.
Thanks
SiYou can get the bytes used with DATALENGTH -
SELECT DATALENGTH(YourImageColumn)
FROM YourTable
You can find more information on DATALENGTH in Books Online.
-Sue
On Mon, 31 Jul 2006 08:36:01 -0700, Simon
<Simon@.discussions.microsoft.com> wrote:
>I have a SQL database that stores image files (pdf, doc, tif etc). Is it
>possible to write a query that shows the size of the file being stored ?
>Any help would be great.
>Thanks
>Si

Image size

I have a SQL database that stores image files (pdf, doc, tif etc). Is it
possible to write a query that shows the size of the file being stored ?
Any help would be great.
Thanks
SiYou can get the bytes used with DATALENGTH -
SELECT DATALENGTH(YourImageColumn)
FROM YourTable
You can find more information on DATALENGTH in Books Online.
-Sue
On Mon, 31 Jul 2006 08:36:01 -0700, Simon
<Simon@.discussions.microsoft.com> wrote:

>I have a SQL database that stores image files (pdf, doc, tif etc). Is it
>possible to write a query that shows the size of the file being stored ?
>Any help would be great.
>Thanks
>Si

Friday, March 23, 2012

Image not displayed while doing Subscriptions

Hi,

I have scheduled subscriptions for a report which has an image in it.

The report is subscribed to be saved in a Report Server File Share in HTML format.

When i open the saved report i see a placeholder x instead of the image.

When i change the subscription format to ADOBE pdf it works fine.

Has anyone faced this problem ?

Any help on this is appreciated.

Thanks

Sam

Out-of-the-box file share delivery extension does not support saving all files for HTML (including images) into targeted share. You need to use MHTML format that allows embedding images (as MIME structures) within the report HTML.|||

Hey

Thanks. I changed it to Web Archive format and it renders them fine.

Just another question. Is there any doc on the internet which explains as to why Reporting Services does not support this out of the box.

THanks

Sam

|||I’m afraid this was not explicitly documented (I can't find such a doc) but I guess it was an intentional decision not to support this. Otherwise if delivery consists of more than 1 file than delivery should handle all cases related to file write operations (permissions, overwriting, file size, etc) for all files in a delivery which makes it more complicated and fragile.|||Thank you so much for all your help on this.

image located on web, url for image stored in database

Hi,

I have a website and i am uploading the gif image to the database. i have used varchar(500) as the datatype and i am saving the file in the webserver so the path to it c:\intepub\....a.gif

my upload table has the folliwing feilds

UploadId Int Identity, Description, FileName, DiskPath varchar(500), weblocation varchar(500). I have a main sproc for the report where i am doing a inner join with other table to get the path of the gif..

So my question is how can i get a picture to show up on the report. .

What kinda datatype the gif file should be stored in the database? If it is stored as a varchar how can i access it and what is best way to reference that particular.

any help will appreciated....

Regards

Karen

This should help:

http://technet.microsoft.com/en-us/library/ms156482.aspx

But I must ask, why do you want to store the image in your database? Why not just host it on a website?

|||Anyone know a way to do this? I want to create a report that will use a table from sql that has a url which points to an image. I want this image to show up in a table in my report. The end goal is to have a searchable report with parameters that supplies immages (from the web) based on search criteria.
|||

Greg,

I have stored the image as a gif file on my webserver, but i couldnt access it, but now i gave the url to it and then specified it as a external image and everything works fine.. i am storing the reference to the image.... in the database.

Thanks a lot.

Regards

Karen

|||If I understand this post, I am having simmilar difficulties. I want to have a table in sql that has verious links to images locaed on the web. I want to display these images in my report. I'm quite confused and pretty new to this so if you can treat me like I know nothing at all and show me step by step what you did I'd really appreciat it.
|||

I have merged the two threads as they are highly related.

|||

Mflancour,

I am uploading the image using a file upload control in the database. and i am storing the like a URL http://Ipaddress/Nameoftheapplication/anyfolders/andsubfoldersintheapplication/Filename.gif. This field is set up in a my database as varchar(500) so i will be storing the above information in that field.

Then, in reporting service .... get the field that u want to access in the particular dataset

From the tool box select image and follow the wizard and select Database and then select the dataset and the field

then select the image and in the properties change the source to external and preview it.

and it should work

hope this helps.

Karen

|||Nevermind figured it out based on your earlier posts
sql

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 Filepath in sql

Hi in my table i have a field which would store the file path of an image, the datatype is a varchar, and i wrote the following filepath in it but it didnt work, when i tried to call it up in the browser it didnt show, is the way i saved it below the right format?

C:\Millio\Documents\Project\Images\car.jpg

That's fine, but you will have to post some of your code so we can see why it might not be diplaying.

|||

Hi thanks for responding this is the part where i am calling the image from;

<ItemTemplate>

<span><spanstyle="font-size: 14pt">

<asp:ImageID="Image1"ImageUrl='<%# Eval("Images") %>'runat="server"/>

<br/>

|||

You should store the virtual path of your image in the database rather than the physical path.

|||

If you use a physical path like the one you are showing, you will need to use an HttpHandler to stream the image to the browser. The img tag takes a url value for the src attribute, so you could move the images to a folder within your web site, and reference them with a virtual path. Or if Project is already your virtual directory (the root folder for your web site), the path that you should store in the database is "images/car.jpg" or "~/images/car.jpg". Both will work, but the second one is ASP.NET specific, and can only be used when setting the ImageURL property of an asp server control. I would opt for the first one, just in case I decided to convert the site to PHP.

Ick!

Or more realistically, decide to use the value to build up the src attribute of an <img> tag in code, and don't bother with a server control.


|||

Hi Mike the reason i did it that way is because i am using a user control to load up my pages, and i didnt want to have to make a page for each category, i will show you what i mean;

<%@.ControlLanguage="C#"AutoEventWireup="true"CodeFile="CategoryList.ascx.cs"Inherits="CategoryList" %>

<scriptrunat="server">

string _Category = "washing machines";

public string Category

{

get { return _Category; }

set { _Category = value; }

}

protected void DataList1_SelectedIndexChanged(object sender, EventArgs e)

{

Label ID = (Label)DataList1.SelectedItem.FindControl("categoryIDLabel");

// Label AD = (Label)DataList1.SelectedItem.FindControl("PriceLabel");

Label MD = (Label)DataList1.SelectedItem.FindControl("categoryNameLabel");

Trace.Write("category " + ID.Text);

//Trace.Write("Price " + AD.Text);

Trace.Write("categoryName " + MD.Text);

Session["scategoryID"] = ID.Text;

//Session["scategorydescription"] = AD.Text;

Session["scategoryName"] = MD.Text;

}

protected void Page_Load(object sender, EventArgs e)

{

SqlDataSource1.SelectParameters["categoryName"].DefaultValue = _Category;

}

</script>

<asp:DataListID="DataList1"runat="server"BackColor="White"BorderColor="Transparent"

BorderStyle="None"BorderWidth="1px"CellPadding="4"DataSourceID="SqlDataSource1"

ForeColor="Black"GridLines="Horizontal"OnSelectedIndexChanged="DataList1_SelectedIndexChanged">

<FooterStyleBackColor="#CCCC99"ForeColor="Black"/>

<SelectedItemStyleBackColor="White"Font-Bold="True"ForeColor="White"Font-Italic="False"Font-Overline="False"Font-Strikeout="False"Font-Underline="False"/>

<HeaderStyleBackColor="#333333"Font-Bold="True"ForeColor="White"/>

<SeparatorStyleBackColor="Black"BorderColor="Black"BorderStyle="Solid"BorderWidth="2px"/>

<AlternatingItemStyleBackColor="White"Font-Bold="False"Font-Italic="False"Font-Overline="False"

Font-Strikeout="False"Font-Underline="False"/>

<ItemTemplate>

<span><spanstyle="font-size: 14pt">

<asp:ImageID="Image1"ImageUrl='<%# Eval("categoryImage") %>'runat="server"/>

<br/>

<asp:LabelID="categoryNameLabel"runat="server"Text='<%# Eval("categoryName") %>'ForeColor="DimGray"Font-Size="11pt"Font-Names="Trebuchet MS"></asp:Label><br/>

<br/>

<spanstyle="color: black"></span>

<asp:LabelID="CategoryIDLabel"runat="server"Visible="False"Text='<%# Eval("categoryID") %>'ForeColor="DimGray"Font-Size="11pt"></asp:Label><br/>

<br/>

<asp:LabelID="categoryDescriptionLabel"runat="server"Visible="True"Text='<%# Eval("categoryDescription") %>'ForeColor="DimGray"Font-Size="11pt"></asp:Label><br/>

<br/>

<br/>

</ItemTemplate>

</asp:DataList>

<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$ ConnectionStrings:streamConnectionString %>"

SelectCommand="SELECT [categoryID], [categoryImage], [categoryName], [categoryDescription] FROM [Categories] WHERE ([categoryName] = @.categoryName)">

<SelectParameters>

<asp:ParameterName="categoryName"Type="string"/>

</SelectParameters>

</asp:SqlDataSource>

Image file save to DB

How to save image file to database?
Which control use best?
hy..
seaching on google might be beneficial :)
Also.. U can check these articles -->
Creating and Saving Images to DataBase
Saving Images in SQL (1)
Saving Images in SQL (2)

Yes [Y]

Image field

Dear friends,
After inserting a word document in an image field, is it possible to
retrieve the same file and store it to some of the windows folder:
1. through SQL Server Stored Procedure?
2. though any other means like .Net code etc..
Thnaks in anticipation
Regards
Sathian> After inserting a word document in an image field, is it possible to
> retrieve the same file and store it to some of the windows folder:
> 1. through SQL Server Stored Procedure?
No idea, but would you want to? T-SQL was not designed for this.

> 2. though any other means like .Net code etc..
Absolutely. It's a piece of cake. Remember that an image field is nothing mo
re
than an array of bytes. All you do is creata a FileStream and set it's conte
nts
to that of the byte array from the image field.
Thomas|||Hello thomas,
Thank you very much.
Any sample piece of code wiich does so..?
I tried in net.. so far I wasn't sucessful..
Regards
Sathian
"Thomas" <thomas@.newsgroup.nospam> wrote in message
news:eoguWJXQFHA.2876@.TK2MSFTNGP09.phx.gbl...
> No idea, but would you want to? T-SQL was not designed for this.
>
> Absolutely. It's a piece of cake. Remember that an image field is nothing
more
> than an array of bytes. All you do is creata a FileStream and set it's
contents
> to that of the byte array from the image field.
>
> Thomas
>|||Although this is not the forum for this sort of question...
private const string connStr = ...
public void ReadFromDBToFile(string destFilePath)
{
byte[] data = null;
using (SqlConnection conn = new SqlConnection(connStr))
{
StringBuilder sb = new StringBuilder();
sb.Append("Select Content, DataLength(Content) As Len");
sb.AppendFormat("\nFrom dbo.TableName");
sb.AppendFormat("\nWhere PK = @.PK");
conn.Open();
using (SqlCommand cmd = new SqlCommand(sb.ToString(), conn))
{
cmd.Parameters.Add("@.PK", SqlDbType...);
cmd.Parameters[0].Value = <pk>
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
int len = dr.GetInt32(1);
data = new byte[len];
dr.GetBytes(0, 0, data, 0, data.Length);
}
}
}
using (FileStream fs = new FileStream(destFilePath, FileMode.Create,
FileAccess.Write, FileShare.Write))
{
fs.Write(data, 0, data.Length);
}
}
public void WriteFromFileToDB(string sourceFilePath)
{
byte[] data;
using (FileStream fs = new FileStream(sourceFilePath, FileMode.Open,
FileAccess.Read, FileShare.Read))
{
data = new byte[fs.Length];
fs.Read(data, 0, (int)fs.Length);
}
using (SqlConnection conn = new SqlConnection(connStr))
{
StringBuilder sb = new StringBuilder();
sb.Append("Update dbo.TableName");
sb.AppendFormat("\nSet Content = @.Content");
sb.AppendFormat("\nWhere PK= @.PK");
conn.Open();
using (SqlCommand cmd = new SqlCommand(sb.ToString(), conn))
{
cmd.CommandType = CommandType.Text;
cmd.Parameters.Add("@.Content", SqlDbType.Image);
cmd.Parameters.Add("@.PK", SqlDbType...
cmd.Parameters[0].Value = data;
cmd.Parameters[1].Value = <pk>
cmd.ExecuteNonQuery();
}
}
}
I used a dynamic SQL statement, but you could just as easily use a stored pr
oc.
HTH
Thomas
"Sathian" <sathian.t@.in.bosch.com> wrote in message
news:d3nfqc$oem$1@.ns2.fe.internet.bosch.com...
> Hello thomas,
> Thank you very much.
> Any sample piece of code wiich does so..?
> I tried in net.. so far I wasn't sucessful..
> Regards
> Sathian
> "Thomas" <thomas@.newsgroup.nospam> wrote in message
> news:eoguWJXQFHA.2876@.TK2MSFTNGP09.phx.gbl...
> more
> contents
>

Image Data Type

In one of the table I have a column"XMLCompressed" with Image data type. I
don't know which type of file it is. I have tried with .xml, .svg, .jpeg etc
.
Is there any way to see what is stored inside that columnHi
Data is stored in binary format
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
---
"Snehal" wrote:

> In one of the table I have a column"XMLCompressed" with Image data type. I
> don't know which type of file it is. I have tried with .xml, .svg, .jpeg e
tc.
> Is there any way to see what is stored inside that column|||I don't want data in binary format. It should be in some understandable form
at
"Chandra" wrote:
> Hi
> Data is stored in binary format
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> http://groups.msn.com/SQLResource/
> ---
>
> "Snehal" wrote:
>|||To SQL Server, data stored with the image datatype is pure binary data. SQL
Server doesn't care what
you put in there, and SQL server doesn't know what format you have in there.
I.e., there's no help
for SQL Server to be expected to understand the format of the data. Consider
having another column
in the table where you specify which format you have for each row (assuming
you have different
formats for different rows).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Snehal" <Snehal@.discussions.microsoft.com> wrote in message
news:92F5954C-728E-4B8B-B45F-4F3FEEE93AE5@.microsoft.com...
>I don't want data in binary format. It should be in some understandable for
mat
> "Chandra" wrote:
>|||Yes I aggree. But what different formats it can have? I just want to see the
contents of image data column. As the name of the column "xmlCompressed"
suggest it may have XML doc in it.
"Tibor Karaszi" wrote:

> To SQL Server, data stored with the image datatype is pure binary data. SQ
L Server doesn't care what
> you put in there, and SQL server doesn't know what format you have in ther
e. I.e., there's no help
> for SQL Server to be expected to understand the format of the data. Consid
er having another column
> in the table where you specify which format you have for each row (assumin
g you have different
> formats for different rows).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Snehal" <Snehal@.discussions.microsoft.com> wrote in message
> news:92F5954C-728E-4B8B-B45F-4F3FEEE93AE5@.microsoft.com...
>
>|||Hi,
You can use image field in sql server as data type field , but I have
another approach to save your data and to be viewable by using ole control
from vb 6 (toolbox) or unbound-bound control in MSACCESS , and later you can
insert object and select as paintbrush object , so you can view this data by
screen or by report.
NB1 : Ole control dropped from VS 2005 (so be careful when you use this
approach)
NB2: Database will upsize quickly.
Thanks,
Tarek Ghazali
"Snehal" <Snehal@.discussions.microsoft.com> wrote in message
news:D92F9D18-088F-41C8-9B54-BBBADB65A10F@.microsoft.com...
> In one of the table I have a column"XMLCompressed" with Image data type. I
> don't know which type of file it is. I have tried with .xml, .svg, .jpeg
> etc.
> Is there any way to see what is stored inside that column|||I adjusted my title (Email from) instead of Microsoft news it's Tarek
Ghazali right now.
Hi,
You can use image field in sql server as data type field , but I have
another approach to save your data and to be viewable by using ole control
from vb 6 (toolbox) or unbound-bound control in MSACCESS , and later you can
insert object and select as paintbrush object , so you can view this data by
screen or by report.
NB1 : Ole control dropped from VS 2005 (so be careful when you use this
approach)
NB2: Database will upsize quickly.
Thanks,
Tarek Ghazali
"Snehal" <Snehal@.discussions.microsoft.com> wrote in message
news:D92F9D18-088F-41C8-9B54-BBBADB65A10F@.microsoft.com...
> In one of the table I have a column"XMLCompressed" with Image data type. I
> don't know which type of file it is. I have tried with .xml, .svg, .jpeg
> etc.
> Is there any way to see what is stored inside that column|||> But what different formats it can have?
The person to ask this is the one who designed the table. Nobody else will k
now (for sure). We can
guess:
XML then zipped
XML then compressed to other standard formats
XML then compressed with some own compression algorithm
XML stored in a compressed format, defined by a standard body
I'd start with the last one. I did a Google on XML compressed and found hits
. I'd check first if
there is an accepted standard for storing XML data in a compressed format.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Snehal" <Snehal@.discussions.microsoft.com> wrote in message
news:D92B416E-1BA3-4682-B822-2A726DAE4085@.microsoft.com...
> Yes I aggree. But what different formats it can have? I just want to see t
he
> contents of image data column. As the name of the column "xmlCompressed"
> suggest it may have XML doc in it.
> "Tibor Karaszi" wrote:
>|||Thanks.
It will realy help me to move ahead.
Will you please ellobarate how to proceed with the guesses? I am also trying
to break as the person who designed the table is not available for my compan
y
right now.
"Tibor Karaszi" wrote:

> The person to ask this is the one who designed the table. Nobody else will
know (for sure). We can
> guess:
> XML then zipped
> XML then compressed to other standard formats
> XML then compressed with some own compression algorithm
> XML stored in a compressed format, defined by a standard body
> I'd start with the last one. I did a Google on XML compressed and found hi
ts. I'd check first if
> there is an accepted standard for storing XML data in a compressed format.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Snehal" <Snehal@.discussions.microsoft.com> wrote in message
> news:D92B416E-1BA3-4682-B822-2A726DAE4085@.microsoft.com...
>
>

Image control in RDLC report page.

Using RDLC report file, How can i set the image path on image control to the image in my folder \images.

I don't see any ImageURL property in such control.

thanks,

Hi,

From your description, it seems that you want to add a image in your report, right?

You can include stored images in a report by specifying a URL to the image. When you use an external image in a report, the image source is set to External and the value for the image is the URL address to the image. For a report published to a report server configured for native mode, use a full or relative path. For example,http://<servername>/images/image1.jpg. For a report published to a report server configured in SharePoint integrated mode, use a fully qualified URL. For example,http://<SharePointservername>/<site>/Documents/images/image1.jpg.

For more information, see:

http://msdn2.microsoft.com/en-us/library/ms156482.aspx

Thanks.

Monday, March 19, 2012

image control file share

I need to add an image in a report, the images are stored on a file share, i
get the path to the image from a database.
How do I set the image control properties to read from the file share. I
tried setting the Source as External and then put the unc path in the Value
property. But that did not work.
MikeHave you considered storing the images in your database? You could use a
varbinary field. It's easier to manage pictures that way IMOHO. And it works
really well in SSRS.
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"Mike Read" <mread@.brunsco.net> wrote in message
news:OovejNEOIHA.2064@.TK2MSFTNGP06.phx.gbl...
>I need to add an image in a report, the images are stored on a file share,
>i get the path to the image from a database.
> How do I set the image control properties to read from the file share. I
> tried setting the Source as External and then put the unc path in the
> Value property. But that did not work.
> Mike
>|||This is not possible since the program that controls the images is a 3rd
party program that I have no control over.
Mike
"Alain Quesnel" <alainsansspam@.logiquel.com> wrote in message
news:%23zVGlUEOIHA.5472@.TK2MSFTNGP04.phx.gbl...
> Have you considered storing the images in your database? You could use a
> varbinary field. It's easier to manage pictures that way IMOHO. And it
> works really well in SSRS.
>
> Alain Quesnel
> alainsansspam@.logiquel.com
> www.logiquel.com
>
> "Mike Read" <mread@.brunsco.net> wrote in message
> news:OovejNEOIHA.2064@.TK2MSFTNGP06.phx.gbl...
>>I need to add an image in a report, the images are stored on a file share,
>>i get the path to the image from a database.
>> How do I set the image control properties to read from the file share. I
>> tried setting the Source as External and then put the unc path in the
>> Value property. But that did not work.
>> Mike
>|||On Dec 6, 3:04 pm, "Mike Read" <mr...@.brunsco.net> wrote:
> I need to add an image in a report, the images are stored on a file share, i
> get the path to the image from a database.
> How do I set the image control properties to read from the file share. I
> tried setting the Source as External and then put the unc path in the Value
> property. But that did not work.
> Mike
I believe that you have to use the "file:///" prefix in the URL in
order to tell the browser to pull from the local drives.
-- Scott|||Thanks, that did it.
Mike
"Orne" <polysillycon@.yahoo.com> wrote in message
news:7c55daf5-2958-4c82-a961-462e9f35746c@.i12g2000prf.googlegroups.com...
> On Dec 6, 3:04 pm, "Mike Read" <mr...@.brunsco.net> wrote:
>> I need to add an image in a report, the images are stored on a file
>> share, i
>> get the path to the image from a database.
>> How do I set the image control properties to read from the file share. I
>> tried setting the Source as External and then put the unc path in the
>> Value
>> property. But that did not work.
>> Mike
> I believe that you have to use the "file:///" prefix in the URL in
> order to tell the browser to pull from the local drives.
> -- Scott

image and text

After I upload a image file to a table with image field, how do I get the
file name? In other words if there 1000 records in one table (1000 images),
how do I know their file names?
Is there a way I can display those images in sql query analyzer using a
T-SQL command.
Using a textcopy, can I retrieve more than 1 record/1 image at a time?
ex: if there are 10 products under one category. Is there a way to retrieve
all 10 products with images using one T-sql statement, and display them on a
web page?
thanks
Vignesh
Uhway
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
It is very good practice to store only the pathes to files located on disk.
It consumes a lot of system resource to deal with images.
There are pretty good examples provided by Microsoft to display images on
the client.

> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
The data is stored in binary format so you will not be able to see the
image.
"Uhway" <vbhadharla@.sbcglobal.net> wrote in message
news:%23rLo8Ct9EHA.3944@.TK2MSFTNGP12.phx.gbl...
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
> Using a textcopy, can I retrieve more than 1 record/1 image at a time?
> ex: if there are 10 products under one category. Is there a way to
retrieve
> all 10 products with images using one T-sql statement, and display them on
a
> web page?
>
> thanks
> Vignesh
>
>
|||If you are storing the images in an image data type, there is no filename,
only the PK of the row where the image is stored. If you wish to keep the
original filename and store the image in an image field, you must also
create a column to store the filename in.
Reasonable people differ on whether or not it is better to store the data in
an image field or only the filename, leaving the data in a physical file.
There are pros and cons to both methods,
Test to see which is better for you.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Uhway" <vbhadharla@.sbcglobal.net> wrote in message
news:%23rLo8Ct9EHA.3944@.TK2MSFTNGP12.phx.gbl...
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
> Using a textcopy, can I retrieve more than 1 record/1 image at a time?
> ex: if there are 10 products under one category. Is there a way to
retrieve
> all 10 products with images using one T-sql statement, and display them on
a
> web page?
>
> thanks
> Vignesh
>
>

image and text

After I upload a image file to a table with image field, how do I get the
file name? In other words if there 1000 records in one table (1000 images),
how do I know their file names?
Is there a way I can display those images in sql query analyzer using a
T-SQL command.
Using a textcopy, can I retrieve more than 1 record/1 image at a time?
ex: if there are 10 products under one category. Is there a way to retrieve
all 10 products with images using one T-sql statement, and display them on a
web page?
thanks
VigneshUhway
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
It is very good practice to store only the pathes to files located on disk.
It consumes a lot of system resource to deal with images.
There are pretty good examples provided by Microsoft to display images on
the client.

> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
The data is stored in binary format so you will not be able to see the
image.
"Uhway" <vbhadharla@.sbcglobal.net> wrote in message
news:%23rLo8Ct9EHA.3944@.TK2MSFTNGP12.phx.gbl...
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
> Using a textcopy, can I retrieve more than 1 record/1 image at a time?
> ex: if there are 10 products under one category. Is there a way to
retrieve
> all 10 products with images using one T-sql statement, and display them on
a
> web page?
>
> thanks
> Vignesh
>
>|||If you are storing the images in an image data type, there is no filename,
only the PK of the row where the image is stored. If you wish to keep the
original filename and store the image in an image field, you must also
create a column to store the filename in.
Reasonable people differ on whether or not it is better to store the data in
an image field or only the filename, leaving the data in a physical file.
There are pros and cons to both methods,
Test to see which is better for you.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Uhway" <vbhadharla@.sbcglobal.net> wrote in message
news:%23rLo8Ct9EHA.3944@.TK2MSFTNGP12.phx.gbl...
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
> Using a textcopy, can I retrieve more than 1 record/1 image at a time?
> ex: if there are 10 products under one category. Is there a way to
retrieve
> all 10 products with images using one T-sql statement, and display them on
a
> web page?
>
> thanks
> Vignesh
>
>

image and text

After I upload a image file to a table with image field, how do I get the
file name? In other words if there 1000 records in one table (1000 images),
how do I know their file names?
Is there a way I can display those images in sql query analyzer using a
T-SQL command.
Using a textcopy, can I retrieve more than 1 record/1 image at a time?
ex: if there are 10 products under one category. Is there a way to retrieve
all 10 products with images using one T-sql statement, and display them on a
web page?
thanks
VigneshUhway
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
It is very good practice to store only the pathes to files located on disk.
It consumes a lot of system resource to deal with images.
There are pretty good examples provided by Microsoft to display images on
the client.
> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
The data is stored in binary format so you will not be able to see the
image.
"Uhway" <vbhadharla@.sbcglobal.net> wrote in message
news:%23rLo8Ct9EHA.3944@.TK2MSFTNGP12.phx.gbl...
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
> Using a textcopy, can I retrieve more than 1 record/1 image at a time?
> ex: if there are 10 products under one category. Is there a way to
retrieve
> all 10 products with images using one T-sql statement, and display them on
a
> web page?
>
> thanks
> Vignesh
>
>|||If you are storing the images in an image data type, there is no filename,
only the PK of the row where the image is stored. If you wish to keep the
original filename and store the image in an image field, you must also
create a column to store the filename in.
Reasonable people differ on whether or not it is better to store the data in
an image field or only the filename, leaving the data in a physical file.
There are pros and cons to both methods,
Test to see which is better for you.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Uhway" <vbhadharla@.sbcglobal.net> wrote in message
news:%23rLo8Ct9EHA.3944@.TK2MSFTNGP12.phx.gbl...
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
> Using a textcopy, can I retrieve more than 1 record/1 image at a time?
> ex: if there are 10 products under one category. Is there a way to
retrieve
> all 10 products with images using one T-sql statement, and display them on
a
> web page?
>
> thanks
> Vignesh
>
>

I'm not sure why this one fails,

I used the following SQL to extract data from our Firms emplyee database and
creates a text file that gets imported into our copy machine controllers.
Output lines look like this:
A|U|4111|MPLS, PBMS|01|0||
A|U|4222|RIC, PBMS|06|0||
A|U|2036|user, name|01|0|N|1234562|
The last number is the last 7 of the persons corporate VISA card. On SQL
2000 this SQL worked:
select 'A|U|' +
RTRIM(EMPLOYEE_CODE) + '|'
+ RTRIM(EMPLOYEE_NAME) + '|'
+ rtrim(offc) + '|0|' +
case position
when 'partner' then 'P'
else 'N'
end
+ '|' , _visano , '|'
from HBM_PERSNL
where INACTIVE = 'N'
and EMPLOYEE_NAME NOT like '%CMS%'
and EMPLOYEE_NAME NOT Like '%billing%'
and EMPLOYEE_NAME NOT Like '%temp%'
On SQL 2005 it doesn't: The sql runs but only delivers those with that
VISA Numeber, where it use to give you both those with and without cards.
Any Ideas?When you don't have a credit card number, are you storing a NULL instead?
Are you getting any errors? How are you creating the file?
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Jay Bukstein" <JayBukstein@.discussions.microsoft.com> wrote in message
news:697B4582-6D4F-47BD-B5DF-F1AD95422D0C@.microsoft.com...
I used the following SQL to extract data from our Firms emplyee database and
creates a text file that gets imported into our copy machine controllers.
Output lines look like this:
A|U|4111|MPLS, PBMS|01|0||
A|U|4222|RIC, PBMS|06|0||
A|U|2036|user, name|01|0|N|1234562|
The last number is the last 7 of the persons corporate VISA card. On SQL
2000 this SQL worked:
select 'A|U|' +
RTRIM(EMPLOYEE_CODE) + '|'
+ RTRIM(EMPLOYEE_NAME) + '|'
+ rtrim(offc) + '|0|' +
case position
when 'partner' then 'P'
else 'N'
end
+ '|' , _visano , '|'
from HBM_PERSNL
where INACTIVE = 'N'
and EMPLOYEE_NAME NOT like '%CMS%'
and EMPLOYEE_NAME NOT Like '%billing%'
and EMPLOYEE_NAME NOT Like '%temp%'
On SQL 2005 it doesn't: The sql runs but only delivers those with that
VISA Numeber, where it use to give you both those with and without cards.
Any Ideas?|||Hi Jay
a quick question, is _visano a column in the HBM_PERSNL table?
I noticed that at the end of the query you are using a comma instead of + to
concat the string, should the query be:
select 'A|U|' +
RTRIM(EMPLOYEE_CODE) + '|'
+ RTRIM(EMPLOYEE_NAME) + '|'
+ rtrim(offc) + '|0|' +
case position
when 'partner' then 'P'
else 'N'
end
+ '|' + _visano + '|'
from HBM_PERSNL
where INACTIVE = 'N'
and EMPLOYEE_NAME NOT like '%CMS%'
and EMPLOYEE_NAME NOT Like '%billing%'
and EMPLOYEE_NAME NOT Like '%temp%'
Lucas
"Jay Bukstein" wrote:

> I used the following SQL to extract data from our Firms emplyee database a
nd
> creates a text file that gets imported into our copy machine controllers.
> Output lines look like this:
> A|U|4111|MPLS, PBMS|01|0||
> A|U|4222|RIC, PBMS|06|0||
> A|U|2036|user, name|01|0|N|1234562|
> The last number is the last 7 of the persons corporate VISA card. On SQL
> 2000 this SQL worked:
> select 'A|U|' +
> RTRIM(EMPLOYEE_CODE) + '|'
> + RTRIM(EMPLOYEE_NAME) + '|'
> + rtrim(offc) + '|0|' +
> case position
> when 'partner' then 'P'
> else 'N'
> end
> + '|' , _visano , '|'
> from HBM_PERSNL
> where INACTIVE = 'N'
> and EMPLOYEE_NAME NOT like '%CMS%'
> and EMPLOYEE_NAME NOT Like '%billing%'
> and EMPLOYEE_NAME NOT Like '%temp%'
> On SQL 2005 it doesn't: The sql runs but only delivers those with that
> VISA Numeber, where it use to give you both those with and without cards.
> Any Ideas?
>|||Sounds like your server or session defaults on '05 yield null on
concatenation; i.e., select 'a' + NULL yields NULL whereas on 2000 select
'a' + NULL yields 'a'.
Suggest to modify the query to
....
'|' + ISNULL(_visano, '') + '|'
...
In fact, this is a good practice for any columns that allow null. That way
changes to server or session settings always yield the same results.
"Jay Bukstein" <JayBukstein@.discussions.microsoft.com> wrote in message
news:697B4582-6D4F-47BD-B5DF-F1AD95422D0C@.microsoft.com...
>I used the following SQL to extract data from our Firms emplyee database
>and
> creates a text file that gets imported into our copy machine controllers.
> Output lines look like this:
> A|U|4111|MPLS, PBMS|01|0||
> A|U|4222|RIC, PBMS|06|0||
> A|U|2036|user, name|01|0|N|1234562|
> The last number is the last 7 of the persons corporate VISA card. On SQL
> 2000 this SQL worked:
> select 'A|U|' +
> RTRIM(EMPLOYEE_CODE) + '|'
> + RTRIM(EMPLOYEE_NAME) + '|'
> + rtrim(offc) + '|0|' +
> case position
> when 'partner' then 'P'
> else 'N'
> end
> + '|' , _visano , '|'
> from HBM_PERSNL
> where INACTIVE = 'N'
> and EMPLOYEE_NAME NOT like '%CMS%'
> and EMPLOYEE_NAME NOT Like '%billing%'
> and EMPLOYEE_NAME NOT Like '%temp%'
> On SQL 2005 it doesn't: The sql runs but only delivers those with that
> VISA Numeber, where it use to give you both those with and without cards.
> Any Ideas?
>

Friday, March 9, 2012

iis log report

hi i want to create a report using iis log
how can i do it

i can do it by transferring log to a sql table
but isn't it a way to directly use log file in reportThe best way would be to directly let the log populate in a ODBC database where you can directly report from.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||But i m using W3C Extended log file,
i need to create report using this file as this format provide much more detail then ODBC option.

should i use custom data extension.

Wednesday, March 7, 2012

IIS 4 Hangs to SQL 2000

Hello everyone,

I've done some searching, asking of friends, and searching every log file and event file I can think of. So now I'm coming here.

Recently I moved some of our databases from an NT4 box running SQL 7 to an Advanced 2000 box running SQL 2000. The web server is still on an NT4 box. It seems that about three times a day or so ASP type files will hang on the webserver. This server hosts different sites and all ASP type files will stop even if some of them hit the old SQL7 server.

Right now I moved the web server back to looking at the SQL 7 machine and things are going fine.

Can anyone offer me a direction to start looking? Why is it working fine to the old stuff but not the new stuff? Is there an issue with NT4 with its IIS trying to talk to an Advanced 2000 with its SQL2000?

Thank you in advance for any help.Are you getting any logs in the event logs when this happens? Are you using ADO to connect to both boxes (7.0 and 2000)? What version is your MDAC or connection dll's at?|||All three MDACs are at 2.6. I say three because of the old SQL7, new SQL2000, and the webserver.

It is using DSN connection on some items. There is one item that I'm not sure of because I didn't code it. Some time ago one of my managers (not with us any more) wrote our Content Managment Assistant (CMA). It is a Java com object. He created it so it gets the server, user, and password information from a registry key.

Just a bit more information, ever since I changed the webserver to go back to the old SQL7 machine there have been no problems. I will gladly get you any more information that might help, but I may need a little more info on finding it, for example, which DLLs in question are you wanting me to check?

Thank you again.