VB Code:
Private Sub cmdViewSeats_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdViewSeats.Click Dim strSeatType As String = cbxSeating.Text Dim intGame As Integer = Val(cbxGame.Text) Dim objRS As New ADODB.Recordset Dim objRS2 As New ADODB.Recordset Dim strSQL As String Dim strSQL2 As String strSQL = "SELECT Section FROM SectionPricing WHERE Description='" & cbxSeating.Text & "'" objRS.Open(strSQL, strConnect) Do Until objRS.EOF strSQL2 = "SELECT SeatNumber FROM Seats WHERE sections='" & objRS.Fields("Section").Value & "'" objRS2.Open(strSQL2, strConnect) objRS.MoveNext() Debug.WriteLine(objRS2.Fields("SeatNumber").Value) Loop End Sub
it breaks at objRS.Open(strSQL,strConnect)
strConnect is declared globaly as
Dim strConnect As String = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=Metro Meteors.mdb"
and that is right because i use it more then once and the times before it work..... i just dont understand why its not working for this new module and its not making sense.....if it works before...why not again???? remember it breaks at that line so its not connecting.....and the SQL statement works for sure cuz i also use that before......




Reply With Quote