Hello everyone,
first of all i hope you're doing well. :sneakiness: ..... So i'm a beginner at vb.net and i have to realize a software for my company: An inventory management . I have two tables
* Inputs which contains (date, id spares, description, price, and quantity)
* outputs which contains also (date,id spares, description , price and quantiy)
i create another table "movments" which is the combinisation of the two tables (inputs and outputs) i wanted to drag:[inputs',outputs' date -spares' ID -inputs'/outputs' quantities] and create a new field "Quantities in stock". My problem is, that the table movments doesn't show in the datagridview. Can anyone help me please? :blue::blue::blue:
PS: i tried the code in access 2007 and it works perfectly , so i don't konw what's the problem in vb (i work with visual studio 2010 professional)
Here's my code:
Public Sub datagridshowentr?sortie()
Dim ds As New DataSet
Dim dt As New DataTable
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
da = New OleDbDataAdapter("SELECT ([Les entr?s].[Date_et_heure] AS [Date entr?],[Les entr?s].[R?f?rence_pdr],[Les entr?s].[Quantit?_pdr] AS [Quantit? entrante],[Les sorties].[Date_et_heure]As[Date sortie],[Les sorties].[Quantit?_pdr] AS[Quantit? sortante])" & _
"FROM [Les entr?s],[les sorties],[Les mouvements]" & _
"where [Les entr?s].R?f?rence_pdr=[Les sorties].R?f?rence_pdr", con)
da.Fill(dt)
DataGridViewX2.DataSource = dt.DefaultView
End Sub
first of all i hope you're doing well. :sneakiness: ..... So i'm a beginner at vb.net and i have to realize a software for my company: An inventory management . I have two tables
* Inputs which contains (date, id spares, description, price, and quantity)
* outputs which contains also (date,id spares, description , price and quantiy)
i create another table "movments" which is the combinisation of the two tables (inputs and outputs) i wanted to drag:[inputs',outputs' date -spares' ID -inputs'/outputs' quantities] and create a new field "Quantities in stock". My problem is, that the table movments doesn't show in the datagridview. Can anyone help me please? :blue::blue::blue:
PS: i tried the code in access 2007 and it works perfectly , so i don't konw what's the problem in vb (i work with visual studio 2010 professional)
Here's my code:
Public Sub datagridshowentr?sortie()
Dim ds As New DataSet
Dim dt As New DataTable
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
da = New OleDbDataAdapter("SELECT ([Les entr?s].[Date_et_heure] AS [Date entr?],[Les entr?s].[R?f?rence_pdr],[Les entr?s].[Quantit?_pdr] AS [Quantit? entrante],[Les sorties].[Date_et_heure]As[Date sortie],[Les sorties].[Quantit?_pdr] AS[Quantit? sortante])" & _
"FROM [Les entr?s],[les sorties],[Les mouvements]" & _
"where [Les entr?s].R?f?rence_pdr=[Les sorties].R?f?rence_pdr", con)
da.Fill(dt)
DataGridViewX2.DataSource = dt.DefaultView
End Sub