The following codes give me 125 records while same select statement using count (*) gives 126.
I have spent a lot of time but could not figure out.
need help.
Sub test1()
Dim strconnection As String
'Dim class1 As New clsDbConnection
Dim _dbname As String
Dim sr As StreamReader = New StreamReader("db_alias_nm.txt")
Dim con As OleDbConnection
_dbname = sr.ReadToEnd
Console.WriteLine(_dbname)
sr.Close()
strConnection = "Provider=MSDAORA.1;User ID=pwmgr;Data Source=" & ds & ";Password=" & pw
con = New OleDbConnection(strconnection)
'class1.strConnection()
Dim testq As String
testq = " select * from " _
& " IOTRANSFERS " _
& " where ((varchar_255_40 =1 and varchar_255_70 is null)" _
& " or(varchar_255_41 =1 and varchar_255_71 is null))" _
ORDER BY VARCHAR_255_32"
Dim c As OleDbCommand
Dim testreader As OleDbDataReader
c = New OleDbCommand(testq, con)
con.Open()
' On Error GoTo ErrorHandle
testreader = c.ExecuteReader()
testreader.Read()
Dim tt As Integer
Do While testreader.Read
tt += 1
Debug.WriteLine(tt & testreader("varchar_255_17"))
Loop
testreader.Close()
con.Close()
End Sub
I have spent a lot of time but could not figure out.
need help.
Sub test1()
Dim strconnection As String
'Dim class1 As New clsDbConnection
Dim _dbname As String
Dim sr As StreamReader = New StreamReader("db_alias_nm.txt")
Dim con As OleDbConnection
_dbname = sr.ReadToEnd
Console.WriteLine(_dbname)
sr.Close()
strConnection = "Provider=MSDAORA.1;User ID=pwmgr;Data Source=" & ds & ";Password=" & pw
con = New OleDbConnection(strconnection)
'class1.strConnection()
Dim testq As String
testq = " select * from " _
& " IOTRANSFERS " _
& " where ((varchar_255_40 =1 and varchar_255_70 is null)" _
& " or(varchar_255_41 =1 and varchar_255_71 is null))" _
ORDER BY VARCHAR_255_32"
Dim c As OleDbCommand
Dim testreader As OleDbDataReader
c = New OleDbCommand(testq, con)
con.Open()
' On Error GoTo ErrorHandle
testreader = c.ExecuteReader()
testreader.Read()
Dim tt As Integer
Do While testreader.Read
tt += 1
Debug.WriteLine(tt & testreader("varchar_255_17"))
Loop
testreader.Close()
con.Close()
End Sub