|
-
Jul 15th, 2004, 06:19 AM
#1
Thread Starter
Addicted Member
dataview
Hi All,
i am trying to write a simple search screen, 1 text box, 1 datagrid and a search button with a datafilter.
VB Code:
Dim sn As String
sn = txtSurname.Text
Dim dvCFilter As New DataView(objdsCSearch.Tables("CDetails"), _
"Surname = '& sn &'", _
"DOB", _
DataViewRowState.CurrentRows)
grdCDetails.DataSource = dvFilter
This works if i change ' & sn & ' to an actual surname but i need to be able to search by the name entered into the text box.
Should i be using dataview to filter?
Cheers
-
Jul 15th, 2004, 06:33 AM
#2
Lively Member
Try:
"Surname='" & sn &"'",
-
Jul 15th, 2004, 06:43 AM
#3
Thread Starter
Addicted Member
DOH!!!!
many thanks, worked a treat (must be out of practice).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|