Dim strSQL1 As String = "SELECT P.Title, P.Artist, P.Price, SUM(P.Price) AS SubTotal FROM Products P, Cart C WHERE C.SessionID='" & _ Session.SessionID & "' AND P.ProductID=C.ProductFK1 GROUP BY P.Title, P.Artist, P.Price" Dim subtotal, tax, total As Double Dim objCommand1 As New System.Data.OleDb.OleDbCommand(strSQL1, objConnection) Try objConnection.Open() Dim rdr As System.Data.OleDb.OleDbDataReader = objCommand1.ExecuteReader Dim dt As System.Data.DataTable = New System.Data.DataTable dt.Load(rdr) objConnection.Close() GridView1.DataSource = dt GridView1.DataBind() dt.Dispose() Catch ex As Exception MsgBox("Connection failed to open. Error: " & ex.ToString()) End Try
Gain unlimited access to on-demand training courses with an Experts Exchange subscription.Get Access
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.