L
Libra Blue
I am extracting data from a database in a very normal SELECT query.
The point is that I want to put some of the data (in the row(s)
extracted in labels not a datagrid or a table. Any idea how??
here's my code (so far!!!)
protected System.Web.UI.WebControls.Label Label1;
DataSet DS = new DataSet ();
OleDbConnection MyConnection;
OleDbDataAdapter MyCommand;
private void Page_Load(object sender, System.EventArgs e)
{
string ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB
Services=-4;" +
"Data Source=C:\\Documents and Settings\\librablue\\My " +
"Documents\\Visual Studio Projects\\Books\\Books.mdb";
MyConnection = new OleDbConnection ( ConnectionString );
MyCommand = new OleDbCommand ( "SELECT * FROM [Books] WHERE
[Books].[Serial]=\'"
+ Session["Serial"] + "\'", MyConnection );
}
and by the way, the OleDbDataReader thing didn't work, or at least I
wasn't able to use it correctly...
Libra Blue
The point is that I want to put some of the data (in the row(s)
extracted in labels not a datagrid or a table. Any idea how??
here's my code (so far!!!)
protected System.Web.UI.WebControls.Label Label1;
DataSet DS = new DataSet ();
OleDbConnection MyConnection;
OleDbDataAdapter MyCommand;
private void Page_Load(object sender, System.EventArgs e)
{
string ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB
Services=-4;" +
"Data Source=C:\\Documents and Settings\\librablue\\My " +
"Documents\\Visual Studio Projects\\Books\\Books.mdb";
MyConnection = new OleDbConnection ( ConnectionString );
MyCommand = new OleDbCommand ( "SELECT * FROM [Books] WHERE
[Books].[Serial]=\'"
+ Session["Serial"] + "\'", MyConnection );
}
and by the way, the OleDbDataReader thing didn't work, or at least I
wasn't able to use it correctly...
Libra Blue