|
-
May 19th, 2003, 03:17 PM
#1
Thread Starter
Sleep mode
Who can fix this ?[Resolved]
I got this working (yes the same code , not the same proj ) two weeks ago . I dunno what's wrong today ? I'm searching database to list the result in a listbox but they are showing as dataview items . f u c k , I'm using exactly the same CODE .
Last edited by Pirate; May 19th, 2003 at 03:46 PM.
-
May 19th, 2003, 03:26 PM
#2
DisplayMember is Case Sensitive, change:
s.SearchDB(TextBox1.Text, "mytab", "c_appname", ListBox1)
To:
s.SearchDB(TextBox1.Text, "mytab", "C_AppName", ListBox1)
Then everything works fine.
-
May 19th, 2003, 03:33 PM
#3
Also in regards to using:
MsgBox(ListBox1.SelectedItem.ToString)
This will still return DataRowView because the value or text of a field isn't specificied as the ToString return. You can use either of the following, but I would suggest the first:
MsgBox(ListBox1.Text)
Or:
MsgBox(DirectCast(ListBox1.SelectedItem, DataRowView).Item(ListBox1.DisplayMember).ToString)
-
May 19th, 2003, 03:37 PM
#4
Thread Starter
Sleep mode
Yes , it seems case sensitive . Thank you Edneeis . You're real Guru .
MsgBox(ListBox1.SelectedItem.ToString)
this line popups the msgbox multiple times , what's wrong ?
-
May 19th, 2003, 03:45 PM
#5
Thread Starter
Sleep mode
Never mind buddy , I won't do it this way .
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
|