T
TonyM
Hi all,
First, Let me say I feel like a complete idiot here, and shamefully come to
you for help. I've read and read and can't get this to work in a web
application, however in a windows application I have no problems. Here it
is:
I have an sqlDataAdapter, sqlDataConnection, and a DataSet. If I right
click on sqlDataAdapter1 and select "Preview Data" and then Fill the
DataSet, it looks fine, my entries in the table (named headerInfo) show up
along with the Column structure.
Now, I have a few editboxes and buttons on the webapp page. When I click on
a button I would like to have the data in the dataset populate the edit
boxes. I've set the databindings in each editbox's properties to the
appropriate field from the dataset. I set the button click event up as
follows:
private void btnRead_Click(object sender, System.EventArgs e)
{
sqlConnection1.Open();
sqlDataAdapter1.Fill(dsHeader1,0,0, "headerInfo");
sqlConnection1.Close();
}
Can someone please tell me how to get the first record of information from
the table "headerInfo", in the Column "Title" to appear as thed text for the
editbox?
I know this is probably something simple, and I am completely missing
something. Any help would be appreciated.
Please don't laugh at me (too much).
Thanks in advance.
First, Let me say I feel like a complete idiot here, and shamefully come to
you for help. I've read and read and can't get this to work in a web
application, however in a windows application I have no problems. Here it
is:
I have an sqlDataAdapter, sqlDataConnection, and a DataSet. If I right
click on sqlDataAdapter1 and select "Preview Data" and then Fill the
DataSet, it looks fine, my entries in the table (named headerInfo) show up
along with the Column structure.
Now, I have a few editboxes and buttons on the webapp page. When I click on
a button I would like to have the data in the dataset populate the edit
boxes. I've set the databindings in each editbox's properties to the
appropriate field from the dataset. I set the button click event up as
follows:
private void btnRead_Click(object sender, System.EventArgs e)
{
sqlConnection1.Open();
sqlDataAdapter1.Fill(dsHeader1,0,0, "headerInfo");
sqlConnection1.Close();
}
Can someone please tell me how to get the first record of information from
the table "headerInfo", in the Column "Title" to appear as thed text for the
editbox?
I know this is probably something simple, and I am completely missing
something. Any help would be appreciated.
Please don't laugh at me (too much).
Thanks in advance.