[Mono-list] Culure problem on sql server

José A. Salvador Vanaclocha joansava at gmail.com
Mon Feb 11 05:37:57 EST 2008


Hi all,

I code the method:

		public static void Main(string[] args)
		{			
			string cnt = "here_is_the_correct_connection_string_to_my_sql_database";
			SqlConnection connection = new SqlConnection(cnt);
			connection.Open();			
			try {
				SqlCommand sqlCommand = new SqlCommand("select * from somtable",
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