Showing posts with label datatype. Show all posts
Showing posts with label datatype. Show all posts

Wednesday, March 28, 2012

Images in SQL

I notice that SQL 2000 has a datatype of image.
My question is after I setup the table and fields how do I populate the
table with image data?Look up the usage and example of statements UPDATETEXT and WRITETEXT in SQL
Server Books Online.
Anith|||I looked those up and they just give examples of writing text to the fields.
I would like to know how to add a picture to the field.
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:OoEv9%23glGHA.4444@.TK2MSFTNGP02.phx.gbl...
> Look up the usage and example of statements UPDATETEXT and WRITETEXT in
> SQL Server Books Online.
> --
> Anith
>|||Image and nText fields are binary fields, like the old BLOB (binary large
object) fields.
To write an image into thsee fields you need to serialize the data into eith
er a
stream or use ADO or ADO.Net
A better question back to you is how and when do you want to get the picture
s
into the database?
Alternatively, you may wish to simply store the images somewhere and use a p
ath
to the raw image files, there are benefits and costs for both methods, in th
e
database or a pointer to a file.
HTH
JeffP...
<Preacher Man> wrote in message news:udRf$ChlGHA.4772@.TK2MSFTNGP04.phx.gbl...
> I looked those up and they just give examples of writing text to the field
s.
> I would like to know how to add a picture to the field.
>
> "Anith Sen" <anith@.bizdatasolutions.com> wrote in message
> news:OoEv9%23glGHA.4444@.TK2MSFTNGP02.phx.gbl...
>|||I am trying to write a simple application for printing employee badges. I
have VFP 9.0 that I will be using as the application writer.
Any ideas on how I should enter these images into the database? I can use a
VFP table or SQL is doesn't really matter to me in this case.
A path to the filename would be fine for me to use also, but how would I
implement that into a form?
Thanks for any info.
"JDP@.Work" <JPGMTNoSpam@.sbcglobal.net> wrote in message
news:%23cB$WUhlGHA.4792@.TK2MSFTNGP02.phx.gbl...
> Image and nText fields are binary fields, like the old BLOB (binary large
> object) fields.
> To write an image into thsee fields you need to serialize the data into
> either a
> stream or use ADO or ADO.Net
> A better question back to you is how and when do you want to get the
> pictures
> into the database?
> Alternatively, you may wish to simply store the images somewhere and use a
> path
> to the raw image files, there are benefits and costs for both methods, in
> the
> database or a pointer to a file.
> HTH
> JeffP...
>
> <Preacher Man> wrote in message
> news:udRf$ChlGHA.4772@.TK2MSFTNGP04.phx.gbl...
>|||Sorry, I'm out of the loop on VFP since 3.2... but google this...
image data into SQL
HTH
JeffP...
<Preacher Man> wrote in message news:%23pQTiXhlGHA.3740@.TK2MSFTNGP02.phx.gbl...ed">
> I am trying to write a simple application for printing employee badges. I
> have VFP 9.0 that I will be using as the application writer.
> Any ideas on how I should enter these images into the database? I can use
a
> VFP table or SQL is doesn't really matter to me in this case.
> A path to the filename would be fine for me to use also, but how would I
> implement that into a form?
> Thanks for any info.
> "JDP@.Work" <JPGMTNoSpam@.sbcglobal.net> wrote in message
> news:%23cB$WUhlGHA.4792@.TK2MSFTNGP02.phx.gbl...
>|||Here is an article that I wrote about storing and retrieving images from SQL
Server that might help:
http://www.dbazine.com/sql/sql-articles/larsen13
"Preacher Man" wrote:

> I notice that SQL 2000 has a datatype of image.
> My question is after I setup the table and fields how do I populate the
> table with image data?
>
>|||See if this helps:
http://groups.google.com/groups/sea...lum
n%22
Steve Kass
Drew University
Preacher Man wrote:

>I notice that SQL 2000 has a datatype of image.
>My question is after I setup the table and fields how do I populate the
>table with image data?
>
>|||I would store them in the filesystem, as suggested. Using the IMAGE
datatype is more of a hassle than it's worth. Here's an article describing
some of the ups and downs: http://www.aspfaq.com/show.asp?id=2149. If you
stored the path to the filename in a VARCHAR column, you would retrieve the
image by filename in your front-end application. I'm not familiar with VFP
9, so I couldn't give you specific advice on that, but I can almost
guarantee it would be easier than using TEXTPTR and READTEXT! :)
<Preacher Man> wrote in message
news:%23pQTiXhlGHA.3740@.TK2MSFTNGP02.phx.gbl...
>I am trying to write a simple application for printing employee badges. I
>have VFP 9.0 that I will be using as the application writer.
> Any ideas on how I should enter these images into the database? I can use
> a VFP table or SQL is doesn't really matter to me in this case.
> A path to the filename would be fine for me to use also, but how would I
> implement that into a form?
>

Friday, March 23, 2012

image question

hello friends

I want to specify a field to save icons I want to give this field a maximum
of 120kb for each icon to be stored in the db.

what datatype should I assign to this field and how do I specify the size ?

Thanks
Tom"Tom" <tomgaomail@.optushome.com.au> wrote in message
news:41512fbd$0$23894$afc38c87@.news.optusnet.com.a u...
> hello friends
> I want to specify a field to save icons I want to give this field a
> maximum
> of 120kb for each icon to be stored in the db.
> what datatype should I assign to this field and how do I specify the size
> ?
> Thanks
> Tom

The image data type is the one used for large binary data, but you can't
specify a size - 2GB is the maximum allowed. Another common approach is to
leave the binary files in the filesystem, and simply store the path to the
file in a varchar column.

Simon|||I considered that option.. however storing path is not the ideal option as
many users may have the same image or icon thus resulting the same image
being sent to all users when the image are suppose to be different as the
image gets overridden when they're the same file name

any other ideas ?
thanks
Tom

"Simon Hayes" <sql@.hayes.ch> wrote in message
news:415175e2$1_2@.news.bluewin.ch...
> "Tom" <tomgaomail@.optushome.com.au> wrote in message
> news:41512fbd$0$23894$afc38c87@.news.optusnet.com.a u...
> > hello friends
> > I want to specify a field to save icons I want to give this field a
> > maximum
> > of 120kb for each icon to be stored in the db.
> > what datatype should I assign to this field and how do I specify the
size
> > ?
> > Thanks
> > Tom
> The image data type is the one used for large binary data, but you can't
> specify a size - 2GB is the maximum allowed. Another common approach is to
> leave the binary files in the filesystem, and simply store the path to the
> file in a varchar column.
> Simon|||"Tom" <tomgaomail@.optushome.com.au> wrote in message
news:41519884$0$20125$afc38c87@.news.optusnet.com.a u...
>I considered that option.. however storing path is not the ideal option as
> many users may have the same image or icon thus resulting the same image
> being sent to all users when the image are suppose to be different as the
> image gets overridden when they're the same file name
> any other ideas ?
> thanks
> Tom

<snip
Not really - those are pretty much the two options you have. Either use the
image data type and store the file in the database, or leave it in the
filesystem and store the path. It comes down to which approach is easier for
you, given your application and development environment.

Personally I'd go for the path, since then changing a user's icon just means
updating a single column, instead of loading the whole file into the
database. Also, any default or common icons only have to be stored once,
rather than maintaining a separate copy for each user.

You should also check out "Managing ntext, text, and image Data" in Books
Online, which covers the details of working with image data, and there's a
code sample for ADO, if that's what you're using.

Simon|||I had a similar problem where i wanted people to store files on my web
server, because i was worried about file name clashes i was considering
storing them in the database. Instead I came up with two ideas, one was to
put each users files into a subdirectory named after their user name, and
two the one that im using, was to first upload the file to the server, add a
database entry and return the result of the @.@.IDENTITY to my program then
preclude the name of the file with the identity value.

thus... myresume.doc would become 243_myresume.doc

Hope those help,
Muhd

"Tom" <tomgaomail@.optushome.com.au> wrote in message
news:41519884$0$20125$afc38c87@.news.optusnet.com.a u...
>I considered that option.. however storing path is not the ideal option as
> many users may have the same image or icon thus resulting the same image
> being sent to all users when the image are suppose to be different as the
> image gets overridden when they're the same file name
> any other ideas ?
> thanks
> Tom
> "Simon Hayes" <sql@.hayes.ch> wrote in message
> news:415175e2$1_2@.news.bluewin.ch...
>>
>> "Tom" <tomgaomail@.optushome.com.au> wrote in message
>> news:41512fbd$0$23894$afc38c87@.news.optusnet.com.a u...
>> > hello friends
>>> > I want to specify a field to save icons I want to give this field a
>> > maximum
>> > of 120kb for each icon to be stored in the db.
>>> > what datatype should I assign to this field and how do I specify the
> size
>> > ?
>>> > Thanks
>> > Tom
>>>>
>> The image data type is the one used for large binary data, but you can't
>> specify a size - 2GB is the maximum allowed. Another common approach is
>> to
>> leave the binary files in the filesystem, and simply store the path to
>> the
>> file in a varchar column.
>>
>> Simon
>>
>>|||thanks thats a great idea

but I'm also curious would it be possible to store the icons into a binary
field and set the size of that binary field ?

Thanks
Tom

"Muhd" <eat@.joes.com> wrote in message
news:cRj4d.493991$gE.369174@.pd7tw3no...
> I had a similar problem where i wanted people to store files on my web
> server, because i was worried about file name clashes i was considering
> storing them in the database. Instead I came up with two ideas, one was
to
> put each users files into a subdirectory named after their user name, and
> two the one that im using, was to first upload the file to the server, add
a
> database entry and return the result of the @.@.IDENTITY to my program then
> preclude the name of the file with the identity value.
> thus... myresume.doc would become 243_myresume.doc
> Hope those help,
> Muhd
>
> "Tom" <tomgaomail@.optushome.com.au> wrote in message
> news:41519884$0$20125$afc38c87@.news.optusnet.com.a u...
> >I considered that option.. however storing path is not the ideal option
as
> > many users may have the same image or icon thus resulting the same image
> > being sent to all users when the image are suppose to be different as
the
> > image gets overridden when they're the same file name
> > any other ideas ?
> > thanks
> > Tom
> > "Simon Hayes" <sql@.hayes.ch> wrote in message
> > news:415175e2$1_2@.news.bluewin.ch...
> >>
> >> "Tom" <tomgaomail@.optushome.com.au> wrote in message
> >> news:41512fbd$0$23894$afc38c87@.news.optusnet.com.a u...
> >> > hello friends
> >> >> > I want to specify a field to save icons I want to give this field a
> >> > maximum
> >> > of 120kb for each icon to be stored in the db.
> >> >> > what datatype should I assign to this field and how do I specify the
> > size
> >> > ?
> >> >> > Thanks
> >> > Tom
> >> >> >>
> >> The image data type is the one used for large binary data, but you
can't
> >> specify a size - 2GB is the maximum allowed. Another common approach is
> >> to
> >> leave the binary files in the filesystem, and simply store the path to
> >> the
> >> file in a varchar column.
> >>
> >> Simon
> >>
> >>|||Tom wrote:
> thanks thats a great idea
> but I'm also curious would it be possible to store the icons into a binary
> field and set the size of that binary field ?
> Thanks
> Tom

NO, you can't specify the size of an image columt - it's variable up to 2 GB.
Here are all the types MS SQL has:

http://www.databasejournal.com/feat...le.phpr/2212141

WYGL,
Andrey|||
As has already been stated, you can't 'set' the size of field, but since your code would load an image
into the field, it could check that the size is within limits before loading it.

--
__________________________________________________ _____
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous

"Tom" <tomgaomail@.optushome.com.au> wrote:
>thanks thats a great idea
>but I'm also curious would it be possible to store the icons into a binary
>field and set the size of that binary field ?
>Thanks
>Tom
>"Muhd" <eat@.joes.com> wrote in message
>news:cRj4d.493991$gE.369174@.pd7tw3no...
>> I had a similar problem where i wanted people to store files on my web
>> server, because i was worried about file name clashes i was considering
>> storing them in the database. Instead I came up with two ideas, one was
>to
>> put each users files into a subdirectory named after their user name, and
>> two the one that im using, was to first upload the file to the server, add
>a
>> database entry and return the result of the @.@.IDENTITY to my program then
>> preclude the name of the file with the identity value.
>>
>> thus... myresume.doc would become 243_myresume.doc
>>
>> Hope those help,
>> Muhd
>>
>>
>> "Tom" <tomgaomail@.optushome.com.au> wrote in message
>> news:41519884$0$20125$afc38c87@.news.optusnet.com.a u...
>> >I considered that option.. however storing path is not the ideal option
>as
>> > many users may have the same image or icon thus resulting the same image
>> > being sent to all users when the image are suppose to be different as
>the
>> > image gets overridden when they're the same file name
>>> > any other ideas ?
>> > thanks
>> > Tom
>>> > "Simon Hayes" <sql@.hayes.ch> wrote in message
>> > news:415175e2$1_2@.news.bluewin.ch...
>> >>
>> >> "Tom" <tomgaomail@.optushome.com.au> wrote in message
>> >> news:41512fbd$0$23894$afc38c87@.news.optusnet.com.a u...
>> >> > hello friends
>> >>> >> > I want to specify a field to save icons I want to give this field a
>> >> > maximum
>> >> > of 120kb for each icon to be stored in the db.
>> >>> >> > what datatype should I assign to this field and how do I specify the
>> > size
>> >> > ?
>> >>> >> > Thanks
>> >> > Tom
>> >>> >>> >>
>> >> The image data type is the one used for large binary data, but you
>can't
>> >> specify a size - 2GB is the maximum allowed. Another common approach is
>> >> to
>> >> leave the binary files in the filesystem, and simply store the path to
>> >> the
>> >> file in a varchar column.
>> >>
>> >> Simon
>> >>
>> >>
>>>>
>>

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

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 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 DataType Default Value

Hi ,

Iam using sqlserver 2005. what default value i can set to image data type.

Thanks

vijay

The Image Datatype is actualy a Binary datatype.

But you can try setting it to 0x00. That does work for VarBinary(max)

Why are you wanting to set a default value?

Image Datatype as Report Parmeter !

I have a lengthy string which has to be passed as Image datatype to the
report so that it is not truncated.
Can it be possible '
chansImage data types are not allowed as parameters...You are limited to a
relatively small list of data types... However you might add the parameter
value to the database in an image column and pass the key value as a
parameter, then the report could look up the image...
--
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
"Chans" <Chans@.discussions.microsoft.com> wrote in message
news:265D8A97-D974-4557-85B9-2D2EFAF37A61@.microsoft.com...
>I have a lengthy string which has to be passed as Image datatype to the
> report so that it is not truncated.
> Can it be possible '
> chans

image datatype - get data out and create insert statement

I am needing to get the data out of a table that has an image datatype, and create an insert statement so that the data can be inserted into other databases(to be used as part of an upgrade script).

I have used the procedure InsertGenerator in the past to create insert statements out of tables that have data. This is the first time I have come across the image datatype. The image part of the procedure looks like this: (@.dataType, @.colName, and @.stringData are nvarchar)

IF @.dataType='image'
BEGIN
SET @.stringData=@.stringData+'''''''''+
isnull(cast(convert(varbinary,'+@.colName+')
as varchar(6)),''0'')+'''''',''+'
END

It successfully creates the insert statement. The insert statement runs successfully, but I am not sure if the image itself is ok. When I use the related application, it crashes and I cannot tell if it is because of the image. When I run a sql trace the last statement ran is pulling back the image as well as a few other columns. When I run the trace statement in query analyzer, it works, but in query analyzer it isnt displaying the image.

My question is will the above statement successfully convert an image to a value that can be inserted into another table and the image recreated when you run the application? Is there something else I need to do to get the image value in a table out so that it can be used in an insert statment.

BTW this is on SQL 2000.

Thank you so much,

Tracey

This thread (found by just looking down the message list without having to even change pages -WOW), may give you the information you desire.

Using a stored procedure to reinsert an image

|||

Perhaps I am not understanding, I am using a script to create and insert statement an example is below. The FileBinary column is the image. I cannot tell if this is correctly extracted as am image. The insert is successful when ran in query analyzer, but the image doesnt display in the application, the application crashes, so I cant tell if it is the image or not.
Creating an insert statement to the same database is not what Im trying to do. I am trying to create an insert statement that can be ran on other like databases not on the network, that are needing this piece of information for the latest version of our application.


insert into JTFile (FileID, Path, Name, Extension, Type, Description, HashValue, Seed, RecordActive,FileBinary) values('0588dbda3f4d483d84259626c251f072','','','.rpt','','test','','2055291722',1,'??')

image datatype

Is the Image Datatype to store pictures and if so how would you transfer a picture in asp.net into a sqldatabase that has this datatype?

if it isnt for pictures what is it used for?the image datatype can be used for any binary files. Not just images.

Check out microsoft's 23 C# samples. One of them does exactly what you want!

http://msdn.microsoft.com/vcsharp/downloads/samples/23samples/default.aspx|||it doesnt work:(
i tried to download it and it said it could not perform my requestsql

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 type

Hi,

In my SQL Server 2000, I have a Table MyUser which has one colum PassWord,
and the PassWord's datatype is Image. I'm wondering how can a password be
an image.
Thanks for help.

JasonI'm guessing it's because the password is actually a binary hash or
encrypted version of the password. It would probably make more sense to use
a BINARY/VARBINARY column though.

--
David Portas
SQL Server MVP
--

"Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
news:dhvjlf$1sk$1@.news.seed.net.tw...
> Hi,
> In my SQL Server 2000, I have a Table MyUser which has one colum PassWord,
> and the PassWord's datatype is Image. I'm wondering how can a password be
> an image.
> Thanks for help.
> Jason

Monday, March 19, 2012

Image and tables

Is it possible to save jpgs in a table if the DataType is set to varbinary(MAX), also how would I save the images to the table.

Thanks

Hi,

yes that possible, but depends on the used coding language, would be nice if you could provide some more information about that.

-Jens Suessmeyer.


http://www.sqlserver2005.de

|||SQL Server backend with Access VBA code|||

Hi,

sorry for picking up your issue this late, but sometime posts get out of sight in my mailbox and the weekend is preferable my time to pick them all up. Have a look at some sample code here:

http://www.freevbcode.com/ShowCode.Asp?ID=1802

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Image datatype

Hi,

I created a table with one column being that of an 'image' data type. The problem is I don't know how to insert an image into that column. Pleas Help.

Hello aniait,

Here is a step-by-step example of storing and retrieving image files in sqlserver 2005 express!

http://chiragrdarji.wordpress.com/2007/03/05/storing-and-retrieving-image-in-sql-server/

Hope this helps!