Color Number Storage

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All

I have run into a bit or frustration. I am trying to save a color into a sql database. I thought that I could just save the result of color.ToArgb but the result I get (-8323200) dosn't work when I use color.fromArgb(-8323200

I figured this would be the best way to save color information into a database but nothing is working. Does anyone have any experiance with this

Thanks for the help
bra
 
Whhat type of field is it defind as in the database? My guess is the field
dosn't support negitive numbers or is not big enough.

Brad said:
Hello All,

I have run into a bit or frustration. I am trying to save a color into a
sql database. I thought that I could just save the result of color.ToArgb
but the result I get (-8323200) dosn't work when I use
color.fromArgb(-8323200)
I figured this would be the best way to save color information into a
database but nothing is working. Does anyone have any experiance with this.
 
Brad,
Which version of VS.NET (2002 or 2003)?

What specifically do you mean "doesn't work"? You get a different color, you
get an exception what?

What type of field are you using the database, it needs to be a 32bit
integer (or larger).

In a simple test I don't see any problems with Color.ToArgb & Color.FromArgb
to convert to & from an Integer, However I have not tried going to a
database...

Hope this helps
Jay

Brad said:
Hello All,

I have run into a bit or frustration. I am trying to save a color into a
sql database. I thought that I could just save the result of color.ToArgb
but the result I get (-8323200) dosn't work when I use
color.fromArgb(-8323200)
I figured this would be the best way to save color information into a
database but nothing is working. Does anyone have any experiance with this.
 
Back
Top