| | |
ADODC Search code
![]() |
•
•
Join Date: Mar 2007
Posts: 59
Reputation:
Solved Threads: 5
I don't get it. Don't you have google?
In 1 second I got this result.
Look here: http://hamilton.bell.ac.uk/swdev1/notes_pp1_5.doc
I just searched on: +adodc +recordset +select
You can also try to seach on: +adodc +recordset +find
In 1 second I got this result.
Look here: http://hamilton.bell.ac.uk/swdev1/notes_pp1_5.doc
I just searched on: +adodc +recordset +select
You can also try to seach on: +adodc +recordset +find
•
•
•
•
hi im just starting to design a database using adodc but I have a problem...
can someone give me tip on how to create a search code for ADODC... thx in advance
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
adcBrowser.Recordset.Find txtSearchHdr.Text & " like '" & txtSearch & "_'", , adSearchForward 'adcBrowser is the name of your ADODC 'txtSearchHdr.Text is your recordset field 'txtSearch is your search criteria
begining with "dav" then txtSearchHdr.Text is sname
and txtSearch is dav
adSearchForward or adSearchBackward can be used.
Last edited by jamello; May 17th, 2007 at 7:06 am.
•
•
Join Date: Jun 2007
Posts: 2
Reputation:
Solved Threads: 0
Remember that you can only search on 1 field with the FindFirst method.
The following code will not work;
The following code will not work;
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
rs.findfirst "NAME=" & 'NAME' & " AND POBOX=" & '2300 PD'
•
•
Join Date: Mar 2007
Posts: 59
Reputation:
Solved Threads: 5
findfirst doesn't exist at all, so even searching on one field won't go
you can you select statements and use:
you can you select statements and use:
vb Syntax (Toggle Plain Text)
Dim cn As ADODB.Connection Dim cmd As ADODB.Command Dim rs As ADODB.Recordset Set cn = New ADODB.Connection Set cmd = New ADODB.Command Set rs = New ADODB.Recordset ' Open the Connection object cmd.ActiveConnection = cn cmd.CommandText = "select " cmd.Execute ' Open a Recordset object on the new table. cmd.CommandText = "SELECT * FROM YOURTABLENAME WHERE YOURFIELDNAME = 'YOURVALUE' " ' "SELECT * FROM YOURTABLENAME WHERE YOURFIELDNAME = 'YOURVALUE' AND YOUROTHERFIELDNAME = 'ANOTHERVALUE' " Set rs = cmd.Execute() rs.Close cn.Close
![]() |
Similar Threads
- Search code in a database (Visual Basic 4 / 5 / 6)
- search code not working!!! (VB.NET)
- Search code ... (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Printer Object
- Next Thread: VB Macro for use across 2 Excel workbooks
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





