คือว่า กดรัน แล้ว สั่ง พิมพ์ แล้วขึ้นแบบนี้ Object reference not set to an instance of an object. คือเป็นอะไรหรอคับ
รบกวนพี่แนะนำทีคับ
โค๊ดคับ
Code (VB.NET)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim connStr As String = ConfigurationManager.ConnectionStrings("testConnectionString").ConnectionString.ToString()
Dim conn As New SqlConnection(connStr)
conn.Open()
Dim da As New SqlDataAdapter("select * from Table_borrow a " & _
" join Table_device b on (b.H_deviceID=a.G_deviceID) " & _
" join Table_member c on (c.A_memberID=a.G_memberID) " & _
" where G_borrowID = '" & Request.QueryString("returnID").ToString() & "' ", conn)
Dim ds As New DataSet
da.Fill(ds, "Table_borrors")
Dim report As New CrystalDecisions.CrystalReports.Engine.ReportDocument() ' สร้างออบเจกต์ของ Engine ของ Crystal Reports
report.Load(Server.MapPath("rpt.rpt"))
report.SetDataSource(ds.Tables("Table_borrors"))
CrystalReportViewer1.ReportSource = report
End Sub
End Class
Tag : ASP.NET, Ms SQL Server 2005, Web (ASP.NET), VB.NET
Dim da As New SqlDataAdapter("select * from Table_borrow a " & _
07." join Table_device b on (b.H_deviceID=a.G_deviceID) " & _
08." join Table_member c on (c.A_memberID=a.G_memberID) " & _
09." where G_borrowID = '" & Request.QueryString("returnID").ToString() & "' ", conn)