From:
<car...@te...> - 2004-06-29 21:22:03
|
Hello: > when I use delimiters (f.e. select 'type' from titles) for the columns > in a select statement then I must use delimiters too when I want to > access the columns in a DataSet filled by this select statement. My > question now is, if this a intended behaviour, and if it is, then what > should I do if want to access the columns without delimiters in the > DataSet? Must I define mappings in the FbDataAdapter? Huummm not sure if i have understood well. Maybe you will need to use double quotes (") This sampel works fine for me: string selectSql = "SELECT \"COUNTRY\", \"CURRENCY\" FROM COUNTRY"; FbConnection connection = new FbConnection(connectionString); connection.Open(); FbCommand command = new FbCommand(selectSql, connection); FbDataAdapter adapter = new FbDataAdapter(command); DataSet ds = new DataSet(); adapter.Fill(ds); Console.WriteLine(ds.Tables[0].Rows[0]["COUNTRY"]); connection.Close(); -- Best regards Carlos Guzmán Álvarez Vigo-Spain |