K
Kimberley Wiggins
Can someone please help me? I am still learning vb so this is fairly
new.
I have been chasing this problem for 3 days now and I think that I am
ready to give up. Does anyone know how to make my data grid display on
a tab control? I have a tab control with 2 tabs on it, one for the
data grid and the other for comments. I have tried everything. Where
do I add the code to say display the data grid on this tab? I have the
code and everything working to fill the data adapter and fill the data
grid from the table but I don't know how to make it display on the tab
control. This is driving me crazy, help...thanks
this is my code for the data adapter:
Dim strOTRConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source= C:\otr.mdb"
Dim strSQLEpisode As String
Dim dtEpisode As New DataTable
Dim dgEpisodes As New DataGrid
dtEpisode.Clear()
strSQLEpisode = "SELECT * " & _
"FROM Episode WHERE showcode = '" & Me.txtCode.Text & "' "
Dim dataAdapter As New OleDb.OleDbDataAdapter (strSQLEpisode,
strOTRConnection)
dataAdapter.Fill(dtEpisode)
dataAdapter.Dispose()
Me.dgEpisodes.DataSource = dtEpisode
As you can see, I handled everything in code so I did not build a
dataset or used any tools. Just added everything to connect the data
adapter in code.
Thanks
new.
I have been chasing this problem for 3 days now and I think that I am
ready to give up. Does anyone know how to make my data grid display on
a tab control? I have a tab control with 2 tabs on it, one for the
data grid and the other for comments. I have tried everything. Where
do I add the code to say display the data grid on this tab? I have the
code and everything working to fill the data adapter and fill the data
grid from the table but I don't know how to make it display on the tab
control. This is driving me crazy, help...thanks
this is my code for the data adapter:
Dim strOTRConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source= C:\otr.mdb"
Dim strSQLEpisode As String
Dim dtEpisode As New DataTable
Dim dgEpisodes As New DataGrid
dtEpisode.Clear()
strSQLEpisode = "SELECT * " & _
"FROM Episode WHERE showcode = '" & Me.txtCode.Text & "' "
Dim dataAdapter As New OleDb.OleDbDataAdapter (strSQLEpisode,
strOTRConnection)
dataAdapter.Fill(dtEpisode)
dataAdapter.Dispose()
Me.dgEpisodes.DataSource = dtEpisode
As you can see, I handled everything in code so I did not build a
dataset or used any tools. Just added everything to connect the data
adapter in code.
Thanks