error : object reference not set to an instance of an object...can anyone help me .thanks in advance
Dim da As New SqlClient.SqlDataAdapter("select job_no from offsale.jobdetails (nolock) where location='" & Session("frmlogin_var_area") & "'", mycon)
Dim ds As New DataSet
If ds.Tables(0).Rows.Count > 0 Then
For i = 0 To (ds.Tables(0).Rows.Count - 1)
Your code is assuming that the DataSet you created and Filled has tables and rows in it.
Either your DataSet doesn't have tables and Table(0) is returning null (Nothing in VB.NET) or the table does exist and Rows(i) is returning null, or Rows(i) is returning a row with no columns.
Only you can figure out which by using the debugger to inspect that line of code when the exception is thrown.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)