not sure why I'm getting this error msg, I have no NULL values being passed...


An unhandled exception of type 'System.NullReferenceException' occurred in pcms.exe

Additional information: Object reference not set to an instance of an object.

It bombs on the bold line...

VB Code:
  1. Dim cmdView As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter("select purchase_date,credit_card_no,vendor_name,transaction_amt,sales_tax_amt,status_ind from pcms.pcms_pcard_transaction_header where purchase_date between TO_DATE('" & tranPeriod & "','mm/dd/yyyy') and TO_DATE('" & tranPeriodEnd & "','mm/dd/yyyy') ", objCon)
  2.         ds = New DataSet()
  3.         cmdView.Fill(ds, "cards")
  4.  
  5.         Dim oRpt As CrystalReport1 ' create new report object
  6.         [b]oRpt.SetDataSource(ds)[/b]
  7.         CrystalReportViewer1.ReportSource = oRpt