4
Answers

how to read only one field of a table

Photo of Administrator

Administrator

22y
2.2k
1
I have a database called HARPIA. In this database i have a table called GENERO, and in this table i have three fields (N_GENERO, GENERO, N_TRIBO). I would like to read only the values into the field N_GENERO and show its values in a Combobox called cboGenero. To do this i used the code below but its not so good. I have some problems with this code. There is anybody that can help me. Whats the correct code to use? thisAdapter = new OleDbDataAdapter( "SELECT n_genero FROM genero WHERE genero = '+ nomegenero'", dbBanco.thisConnection); thisBuilder = new OleDbCommandBuilder(thisAdapter); thisDataSet = new DataSet(); thisAdapter.Fill(thisDataSet,"genero"); cboGenero.text = thisDataSet.Tables ["genero"].Columns ["n_genero"]; }

Answers (4)

0
Photo of Mykonine
NA 520 0 20y
I should probably make myself clearer: When you put your mouse over the icon a certain text is displayed. I want to programmatically force that same box with text to display without requiring the user to hover the mouse over the icon. Basically an alert.