tenriquez199
asked on
how retrieve data acccess db with c#
hi..
i'm making a web application in c# read access db this is my code:
protected void Consultar_Click1(object sender, EventArgs e)
{
string sql = @"SELECT Id_Venta
,Id_Producto
,Cantidad
,Fecha_Venta
,Id_Cajero
FROM VENTAS
WHERE Id_Venta = @Id";
string connectionString = "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=C:\\TOÑO\\daniel\\D atabase21. mdb";
System.Data.OleDb.OleDbCon nection conn = new System.Data.OleDb.OleDbCon nection(co nnectionSt ring);
System.Data.OleDb.OleDbDat aAdapter myDataAdapter = new System.Data.OleDb.OleDbDat aAdapter(" SELECT * FROM VENTAS where ID_Venta = '" + "1" + "'", conn);
System.Data.DataSet myDataSet = new System.Data.DataSet("VENTA S");
myDataAdapter.Fill(myDataS et, "VENTAS");
conn.Close();
return ;
}
someone can help me...i need to put data retrieved at textboxes, but i don't know wich stape missing
thanks a lot
i'm making a web application in c# read access db this is my code:
protected void Consultar_Click1(object sender, EventArgs e)
{
string sql = @"SELECT Id_Venta
,Id_Producto
,Cantidad
,Fecha_Venta
,Id_Cajero
FROM VENTAS
WHERE Id_Venta = @Id";
string connectionString = "Provider=Microsoft.Jet.OL
System.Data.OleDb.OleDbCon
System.Data.OleDb.OleDbDat
System.Data.DataSet myDataSet = new System.Data.DataSet("VENTA
myDataAdapter.Fill(myDataS
conn.Close();
return ;
}
someone can help me...i need to put data retrieved at textboxes, but i don't know wich stape missing
thanks a lot
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER