[VB6] Search about Strings using Ado
Hi all
I am working on a program that needs database, I usually use Ado or Data. I see that Ado is more and more Easily. BUT, I need to search in some fields about string data, and I get faults..
I need a way to search using Ado about Strings.
Thanks, Eng27
Re: [VB6] Search about Strings using Ado
Re: [VB6] Search about Strings using Ado
This is my code:
Adodc1.Refresh
Adodc1.RecordSet.Find "Name=" & Text1.Text
.
When I use this code it doesn't work. but when I search in the field id (which contain numeric data) and search about Val(Text1.Text) It works perfectly..
WHY?!
Re: [VB6] Search about Strings using Ado
See the Database Development FAQs & Tutorials - Database system specific:
http://www.vbforums.com/showthread.p...ed-May-13-2011
Re: [VB6] Search about Strings using Ado
Quote:
Originally Posted by
gibra
oh Thanks
Re: [VB6] Search about Strings using Ado
try
Code:
Adodc1.RecordSet.Find "Name='" & Text1.Text & "'"
string field types need to be enclosed in ' '
Re: [VB6] Search about Strings using Ado
Quote:
Originally Posted by
westconn1
try
Code:
Adodc1.RecordSet.Find "Name='" & Text1.Text & "'"
string field types need to be enclosed in ' '
Great.. Thanks a lot, this is reasonable..