bdesh tiger

bdesh tiger

  • NA
  • 7
  • 0

How to get field name

Jun 5 2007 5:15 PM
Dear All,

Jumed from VB to C# thus getting deficulty on every step. How to get fieldname from a table?

cnn = new OleDbConnection(conStr);

cnn.Open();

da = new OleDbDataAdapter("select * from " + sTableName, cnn);

ds = new DataSet();

da.Fill(ds, sTableName);

It works till here. Now to save data i want to get field name

lssql = "update " + tablename + " set " + fieldName + "='" +

txtDescription.Text + "'";

savedata codes goes here....

In my table i have two field like ID and description. How can i get 2nd field name by coding? 

I am using VB2005, C#, OleDb command

Thanks in advantage.

BT


Answers (4)