Data table not filled
-
2012年4月30日 9:06
If Page.IsPostBack = False Then
Dim strAccidentQuery As String = ""
Dim strScheduleMaintenance As String = ""
Dim strBreak As String = ""strBreak = " Select * from CarTrnRental A " & _
"inner join Car_TrnBreakDownMaint E on E.TrnID=A.TrnID " & _
"inner join CarMstMake B on A.MakeID=B.MakeID " & _
"inner join CarMstRental D on D.TrnID=A.TrnID " & _
"inner join CarMstLocation L on L.LocationID=A.LocationID "
strAccidentQuery = " Select * from CarTrnRental A " & _
"inner join Car_TrnAccidentMaintenance E on E.TrnID=A.TrnID " & _
"inner join CarMstMake B on A.MakeID=B.MakeID " & _
"inner join CarMstRental D on D.TrnID=A.TrnID " & _
"inner join CarMstLocation L on L.LocationID=A.LocationID"'strQry2 = " Select * from CarTrnRental A " & _ Dont uncomment
' "inner join Car_TrnAccidentMaintenance E on E.TrnID=A.TrnID " & _
' "inner join CarMstMake B on A.MakeID=B.MakeID " & _
' "inner join CarMstRental D on D.TrnID=A.TrnID " & _
' "inner join CarMstLocation L on L.LocationID=A.LocationID"strScheduleMaintenance = " Select * from CarTrnRental A " & _
"inner join Car_TrnScheduleMaintenance E on E.TrnID=A.TrnID " & _
"inner join CarMstMake B on A.MakeID=B.MakeID " & _
"inner join CarMstRental D on D.TrnID=A.TrnID " & _
"inner join CarMstLocation L on L.LocationID=A.LocationID " & _
"inner join Car_MstScheduleMaintJobSheet T on T.TrnId=A.TrnID"Dim sqladptAccient As New SqlDataAdapter(strAccidentQuery, CommConn)
Dim sqladptSchedule As New SqlDataAdapter(strScheduleMaintenance, CommConn)
Dim sqladptBreak As New SqlDataAdapter(strBreak, CommConn)Dim dtAccident As New DataTable
Dim dtSchedule As New DataTable
Dim dtBreakdown As New DataTable
CommConn.Open()
sqladptAccient.Fill(dtAccident)
sqladptBreak.Fill(dtBreakdown)
sqladptSchedule.Fill(dtSchedule)rgView2.DataSource = dtAccident
rgView2.DataBind()
rgView1.DataSource = dtBreakdown
rgView1.DataBind()
rgView3.DataSource = dtSchedule
rgView3.DataBind()
CommConn.Close()rgView2.Visible = True
'rgView2.Rebind()
rgView1.Visible = True
'rgView1.Rebind()
rgView3.Visible = True
'rgView3.Rebind()
radtab1.Visible = True- 編集済み marico124 2012年4月30日 9:08 forgot in hurry
- 移動 Jack Zhai - MSFTMicrosoft Contingent Staff 2012年5月1日 7:05 It is a VB issue. (From:Visual Studio Code Analysis and Code Metrics)
すべての返信
-
2012年5月1日 7:04
Hi marico124,
I am moving your thread into the Visual Basic General Forum for dedicated support. Thanks for your understanding.
Best Regards,Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
-
2012年5月1日 15:09
Looks like ASP.NET so this question probably needs to be re-posted in one of those forums:
Paul ~~~~ Microsoft MVP (Visual Basic)
- 編集済み Paul P Clement IVMVP 2012年5月1日 15:10
- 回答の候補に設定 Mike FengMicrosoft Contingent Staff, Moderator 2012年5月8日 13:15
-
2012年5月1日 15:23
You don't not make it very clear if you mean the datatables or the presentation part. If it is the first then it is of course VB if it is the second then visit the Asp.Net forum.
However, the pain is probably in your SQL query
I recommend you first to try that in Query analyzer (a piece included in SQL manager).
For help I about that I recommend this forum special forum for SQL Transact code.
http://social.msdn.microsoft.com/Forums/en-US/transactsql/threads
However, better than that all above is probably to use
SQL Server profiler, you can then see what kind of transact is created and what is returned as result
http://msdn.microsoft.com/en-us/library/ms181091.aspx
Success
Cor
- 編集済み Cor LigthertMVP 2012年5月1日 15:24
- 編集済み Cor LigthertMVP 2012年5月1日 15:26
- 編集済み Cor LigthertMVP 2012年5月1日 15:55
- 回答としてマーク Mike FengMicrosoft Contingent Staff, Moderator 2012年5月8日 13:15

