M
Milsnips
Hi there,
i'm trying to replace my dataset code to get results and return them into a
sqlCeResultSet but filtered by user entry, eg:
Sub GetCustomerList(ByVal g As DataGrid, Optional ByVal search As String = "")
Dim ceRs As SqlCeResultSet
g.DataSource = Nothing
g.RowHeadersVisible = False
g.ColumnHeadersVisible = False
g.TableStyles(0).MappingName = ""
cmd.CommandType = CommandType.TableDirect
cmd.CommandText = "Partneri"
cmd.IndexName = "pnameindex"
Try
ceRs = cmd.ExecuteResultSet(ResultSetOptions.Scrollable)
g.DataSource = ceRs
ceRs.Seek(DbSeekOptions.FirstEqual, New String() {search})
g.TableStyles(0).GridColumnStyles(0).Width = 0
Catch ex As SqlCeException
MsgBox(ex.Message)
Finally
ceRs = Nothing
End Try
End Sub
but.. it returns me all the results and doesnt filter by my "search" parameter. Any ideas why?
thanks.
Paul
i'm trying to replace my dataset code to get results and return them into a
sqlCeResultSet but filtered by user entry, eg:
Sub GetCustomerList(ByVal g As DataGrid, Optional ByVal search As String = "")
Dim ceRs As SqlCeResultSet
g.DataSource = Nothing
g.RowHeadersVisible = False
g.ColumnHeadersVisible = False
g.TableStyles(0).MappingName = ""
cmd.CommandType = CommandType.TableDirect
cmd.CommandText = "Partneri"
cmd.IndexName = "pnameindex"
Try
ceRs = cmd.ExecuteResultSet(ResultSetOptions.Scrollable)
g.DataSource = ceRs
ceRs.Seek(DbSeekOptions.FirstEqual, New String() {search})
g.TableStyles(0).GridColumnStyles(0).Width = 0
Catch ex As SqlCeException
MsgBox(ex.Message)
Finally
ceRs = Nothing
End Try
End Sub
but.. it returns me all the results and doesnt filter by my "search" parameter. Any ideas why?
thanks.
Paul