G
Guest
I have a table with no Lines on it. I enter the dtr as below with a counter set to 0 on the first time in. The dtr.Read is 'False'. This returns the message "No Lines on Order!
I then enter a new line on that screen and call the dtr again. The dtr.Read is True but the flow of control does not enter
the While (dtr.Read()) = True. I cannot understand why not. Any ideas welcome. Thanks, Marc
Tr
Dim dtr As SqlCeDataReader = cmdSQL.ExecuteReader(CommandBehavior.Default
Dim counter As String =
MessageBox.Show(dtr.Read
While (dtr.Read()) = Tru
MessageBox.Show(counter
item = New ListViewItem(dtr.GetSqlInt32(0).ToString
item.SubItems.Add(dtr.GetString(1)
item.SubItems.Add(dtr.GetSqlInt32(2).ToString
lstOrderDtl.Items.Add(item
counter = counter +
End Whil
If counter = 0 The
MessageBox.Show(counter
MessageBox.Show("No Lines on Order!"
End I
dtr.Close(
Catch ex As SqlCeExceptio
DisplaySQLCEErrors(ex
Finall
cmdSQL.Dispose(
End Try
I then enter a new line on that screen and call the dtr again. The dtr.Read is True but the flow of control does not enter
the While (dtr.Read()) = True. I cannot understand why not. Any ideas welcome. Thanks, Marc
Tr
Dim dtr As SqlCeDataReader = cmdSQL.ExecuteReader(CommandBehavior.Default
Dim counter As String =
MessageBox.Show(dtr.Read
While (dtr.Read()) = Tru
MessageBox.Show(counter
item = New ListViewItem(dtr.GetSqlInt32(0).ToString
item.SubItems.Add(dtr.GetString(1)
item.SubItems.Add(dtr.GetSqlInt32(2).ToString
lstOrderDtl.Items.Add(item
counter = counter +
End Whil
If counter = 0 The
MessageBox.Show(counter
MessageBox.Show("No Lines on Order!"
End I
dtr.Close(
Catch ex As SqlCeExceptio
DisplaySQLCEErrors(ex
Finall
cmdSQL.Dispose(
End Try