G
Guest
Hello
if i use SqlCeDataReader to read SQLCE data, but can not display first row record???
{
Dim ListViewItem1 As New ListViewIte
Dim subItem1 As New ListViewItem.ListViewSubIte
Dim tmpReader As SqlCeDataReade
Dim sqlCmd As New SqlServerCe.SqlCeCommand("SELECT Barcode,Qty FROM PullCE Order by Barcode", connCE
tmpReader = sqlCmd.ExecuteReade
Listvar.FullRowSelect = Tru
Listvar.Clear(
Listvar.Columns.Add("Barcode ", 130, HorizontalAlignment.Center
Listvar.Columns.Add("Qty ", -2, HorizontalAlignment.Center
If tmpReader.Read = True The
While tmpReader.Read(
ListViewItem1 = New ListViewIte
ListViewItem1.Text = tmpReader("Barcode"
subItem1 = New ListViewItem.ListViewSubIte
subItem1.Text = tmpReader("Qty").ToStrin
ListViewItem1.SubItems.Add(subItem1
Listvar.Items.Add(ListViewItem1
ListViewItem1 = Nothin
subItem1 = Nothin
End Whil
End I
Listvar.View = View.Detail
tmpReader = Nothin
connCE.Close(
what wrong in this code?????
if i use SqlCeDataReader to read SQLCE data, but can not display first row record???
{
Dim ListViewItem1 As New ListViewIte
Dim subItem1 As New ListViewItem.ListViewSubIte
Dim tmpReader As SqlCeDataReade
Dim sqlCmd As New SqlServerCe.SqlCeCommand("SELECT Barcode,Qty FROM PullCE Order by Barcode", connCE
tmpReader = sqlCmd.ExecuteReade
Listvar.FullRowSelect = Tru
Listvar.Clear(
Listvar.Columns.Add("Barcode ", 130, HorizontalAlignment.Center
Listvar.Columns.Add("Qty ", -2, HorizontalAlignment.Center
If tmpReader.Read = True The
While tmpReader.Read(
ListViewItem1 = New ListViewIte
ListViewItem1.Text = tmpReader("Barcode"
subItem1 = New ListViewItem.ListViewSubIte
subItem1.Text = tmpReader("Qty").ToStrin
ListViewItem1.SubItems.Add(subItem1
Listvar.Items.Add(ListViewItem1
ListViewItem1 = Nothin
subItem1 = Nothin
End Whil
End I
Listvar.View = View.Detail
tmpReader = Nothin
connCE.Close(
what wrong in this code?????