[Mono-list] Converting float to string for a MySQL db and internationalisation
Sergio Blanco Cuaresma
sergio-blanco@iespana.es
Fri, 26 Dec 2003 20:48:48 +0100
--=-glkfj+oRc2T9c1FpFrRk
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
I have a little problem and I don't know how to solve it in an elegant
way, due to internationalisation (my locales are "es_ES@euro") when I
convert from a float type to string the decimal separator is ",", thats
fantastic but I'm trying to insert that value in a MySQL database, and
it seems to need "." as decimal separator:
string sql =3D "INSERT INTO indexed VALUES ('" +
(fileInfo.Length).ToString("#.##") + "');";
How would you solve this little problem? Is there any more elegant way
of inserting data in a MySQL database? I'm using ByteFX.Data.
Thanks ;-)
--=20
[aka Marble]
Web Personal <> http://www.marblestation.com
Registered LiNUX user #140941 <> http://counter.li.org/
Socio #3274 de HispaLinux <> http://www.hispalinux.es
Miembro de GPL URV <> http://www.gplurv.org
GnuPG key: 0x0ED2CF9D <> hkp://pgp.escomposlinux.org
--=-glkfj+oRc2T9c1FpFrRk
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
digitalmente
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQA/7JCffGXf5g7Sz50RAjXNAKDvwvgNtfY+pVw7zrxm+FhNqk1/KgCaAvXq
KZoJdJjlwtomBXklK5GkTsc=
=9NIx
-----END PGP SIGNATURE-----
--=-glkfj+oRc2T9c1FpFrRk--