Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

The Correct DataBiding statement

Feb 27 2003 11:25 AM
I would like to know how to use the DataBiding to show the values of a table in a Text Box. I have a text box called TXT1 in a Windows Form and i make the correct connection to a database and the DataAdapter and DataSet. But i dont know how to construct the correct DataBinding statement. I must place before or after to the DataSet? There is anybody to show me where i put the DataBinding code in the example below. Since already I am thankful. thisConnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Andre\Teste\HARPIA.MDB"); thisConnection.Open(); OleDbDataAdapter thisAdapter = new OleDbDataAdapter ( "SELECT registro, n_tipo, n_taxon, numerodecampo FROM sgc", thisConnection); OleDbCommandBuilder thisBuilder = new OleDbCommandBuilder (thisAdapter); DataSet thisDataSet = new DataSet (); thisAdapter.Fill (thisDataSet, "sgc");

Answers (2)