[Mono-list] CultureInfo problem

José A. Salvador Vanaclocha joansava at gmail.com
Wed Feb 27 06:49:02 EST 2008


Hi all,

It's the third time I try to send this email to mono list. I don't
know what is the problem. I hope this mail arrive at least.

By other hand, here is my problem:

 I code the method:

                public static void Main(string[] args)
                {
                        string cnt =
 "here_is_the_correct_connection_string_to_sql_server_database";
                        SqlConnection connection = new SqlConnection(cnt);
                        connection.Open();
                        try {
                                SqlCommand sqlCommand = new
 SqlCommand("select * from sometable",
 connection);
                                SqlDataReader reader =
 sqlCommand.ExecuteReader();
                                try {
                                        while (reader.Read()) {
                                                for (int i = 0; i <
 reader.FieldCount; i++) {

 System.Console.Write("-" + reader[i].ToString());
                                                }

 System.Console.WriteLine(">>> Next record");
                                        }
                                } finally {
                                        reader.Close();
                                }
                        } finally {
                                connection.Close();
                        }
                }

 Just before connection will be open I get the following exception:

 "Unhandled Exception: System.ArgumentException: Culture ID 1034
 (0x040A) is not a supported culture."

 This code was working fine for me two weeks ago. I don't understand
 what is the reason this code fails. By other hand the culture code
 (0x040A) named in the exception is the correct code (traditional
 spanish) although I don't pass the culture parameter explicitaly.

 Does anybody know what is the problem?

 Thanks in advance.

 --
 José A. Salvador Vanaclocha "Vana"
 Numenalia

 "La inspiración existe, pero tiene que encontrarte trabajando"
 - Pablo Ruiz Picasso -

 PD: Si te he mandado algun documento que tu Micro$oft Word es INCAPAZ
 de abrir, hazte un favor y trabaja con un programa decente:

 http://es.openoffice.org/


More information about the Mono-list mailing list