Home All Groups Group Topic Archive Search About
Author
5 Oct 2005 6:44 AM
Jason Huang
Hi,

I have a PassWord column in SQL Server 2000 which is image datatype.
How do I transfer or decode/encode text to image datatype so that my SQL
Server recongnize it?
Any help will be appreciated.

Jason

Author
5 Oct 2005 6:55 AM
Jason Short
You mean you have a "variable" named PassWord that is an image.  The column
names in SQL don't mean anything.  You could have called it Pass____Word if
you wanted.  Does not even mean that it is used for storing passwords...

If it is an image type then it is probably NOT a password, but an image.  If
you are using something internally to reference an image to a password then
I would think you would know how to do it already....


Show quoteHide quote
"Jason Huang" <JasonHuang8***@hotmail.com> wrote in message
news:e4kZ3gXyFHA.2500@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I have a PassWord column in SQL Server 2000 which is image datatype.
> How do I transfer or decode/encode text to image datatype so that my SQL
> Server recongnize it?
> Any help will be appreciated.
>
> Jason
>
Are all your drivers up to date? click for free checkup

Author
5 Oct 2005 8:41 AM
Jason Huang
Thanks Jason!

In my application I have 2 TextBox, one is txtUserID, the other one is
txtPassWord.
When the user login the AP, it then will check if the UserID and PassWord
match the corresponding data in SQL Server 2000,
where the data column UserID is varchar, and the data column PassWord is
image.


Show quoteHide quote
"Jason Short" <spam@1spam.biz> ¼¶¼g©ó¶l¥ó·s»D:%23ashFnXyFHA.***@tk2msftngp13.phx.gbl...
> You mean you have a "variable" named PassWord that is an image.  The
> column names in SQL don't mean anything.  You could have called it
> Pass____Word if you wanted.  Does not even mean that it is used for
> storing passwords...
>
> If it is an image type then it is probably NOT a password, but an image.
> If you are using something internally to reference an image to a password
> then I would think you would know how to do it already....
>
>
> "Jason Huang" <JasonHuang8***@hotmail.com> wrote in message
> news:e4kZ3gXyFHA.2500@TK2MSFTNGP10.phx.gbl...
>> Hi,
>>
>> I have a PassWord column in SQL Server 2000 which is image datatype.
>> How do I transfer or decode/encode text to image datatype so that my SQL
>> Server recongnize it?
>> Any help will be appreciated.
>>
>> Jason
>>
>
>
Author
5 Oct 2005 12:35 PM
Ignacio Machin ( .NET/ C# MVP )
Hi,

> If it is an image type then it is probably NOT a password, but an image.
> If you are using something internally to reference an image to a password
> then I would think you would know how to do it already....

An Image in SQL can be used to store any binary data, probably the OP is
hashing or encrypting the text in binary form and storing that in the DB


cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Author
5 Oct 2005 7:59 AM
Cor Ligthert [MVP]
Jason,

An image on the server is nothing more than a ByteArray. Byte[]

Something as roughly typed here
\\\
Byte[]  abyt = (Byte[]) ds.Tables[0].Rows[0][0];
IO.MemoryStream ms  = new IO.MemoryStream(abyt);
PictureBox1.Image = Image.FromStream(ms);
///

I hope this helps,

Cor
Author
5 Oct 2005 11:29 AM
Kevin Spencer
Hi Jason,

You just insert it into the column. Example:

INSERT INTO Password (passwordImageColumn) 'YourPassword'

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Big things are made up of
lots of little things.

System.Text.Encoding enc = System.Text.Encoding.Default;
byte[] bytes = enc.
Show quoteHide quote
"Jason Huang" <JasonHuang8***@hotmail.com> wrote in message
news:e4kZ3gXyFHA.2500@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I have a PassWord column in SQL Server 2000 which is image datatype.
> How do I transfer or decode/encode text to image datatype so that my SQL
> Server recongnize it?
> Any help will be appreciated.
>
> Jason
>

Bookmark and Share