Gracias por leer!!
El problema que tengo es que necesito enlazar 3 tablas en un dataset o como sea, este es el codigo pero me queda grande alguien podría ayudarme.
Sub Page_Load(Sender As Object, E As EventArgs)
MyConnection = New OleDbConnection("PROVIDER=MICROSOFT.JET.OLEDB.4.0; DATA SOURCE=" & Server.MapPath("../****/vasijosas.mdb"))
If Not (IsPostBack)
Dim DS As DataSet
Dim MyCommand As OleDbDataAdapter
MyCommand = New OleDbDataAdapter("select distinct cosecha from inventario", MyConnection)
DS = new DataSet()
MyCommand.Fill(DS, "inventario")
MySelect.DataSource= DS.Tables("inventario").DefaultView
MySelect.DataBind()
End If
End Sub
Sub GetAuthors_Click(Sender As Object, E As EventArgs)
Dim SelectCmd As String = "select Cepa.inventario, Saldo.inventario, cosecha.inventario, fecha.comprobante, capacidad.cubas, bodega.cubas, cod_cuba.cubas, cuba.inventario from inventario, cubas, comprobante where cosecha.inventario = @Cosecha and cuba.inventario = cod_cuba.cubas "
Dim DS As DataSet
Dim MyCommand As OleDbDataAdapter
MyCommand = New OleDbDataAdapter(SelectCmd, MyConnection)
MyCommand.SelectCommand.Parameters.Add(New OleDbParameter("@cosecha", SqlDbType.NVarChar, 2))
MyCommand.SelectCommand.Parameters("@cosecha").Val ue = MySelect.Value
DS = new DataSet()
MyCommand.Fill(DS, "inventario")
MyDataGrid.DataSource= DS.Tables("inventario").DefaultView
MyDataGrid.DataBind()
End Sub
Gracias de Antemano!