|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
image datatype in C#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 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 > 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 >> > > Hi,
> If it is an image type then it is probably NOT a password, but an image. An Image in SQL can be used to store any binary data, probably the OP is > 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.... 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 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 Hi Jason,
You just insert it into the column. Example: INSERT INTO Password (passwordImageColumn) 'YourPassword' -- Show quoteHide quoteHTH, 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. "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 >
Other interesting topics
Windows Forms question
Structs and delegates Not returning boolean correctly copy ctore, assignment operator and Clone() - dang! Need a fast way(c#) to get directory of files over a WAN using selection criteria How do I add a new column cominging 2 string and a int column ? XCOPY return ExitCode 4 in C# code. MenuItems.Clear() Problem Database problem.....HELP Programmatically read file(s) from a USB device |
|||||||||||||||||||||||