 |
| View previous topic :: View next topic |
| Author |
Message |
rina Newbie
Joined: 02 Sep 2005 Posts: 9
|
Posted: Sep 3rd, 2005 02:50 PM Post subject: column and row in recordset |
|
|
Hi all. I wanted to know if there is any function to locate row and column in a recordset.
I mean to say like in MSFlexgrid, we have MSFlexgrid1.Textmatrix(row,column).
What about recordset? Is there any kind of function like that? |
|
| Back to top |
|
dougthomas Moderator
Joined: 27 Jul 2005 Posts: 271 Location: Essex, UK
|
Posted: Sep 4th, 2005 03:17 AM Post subject: |
|
|
Hi Rina,
The only thing I can think of is the Recordset Find method
| Quote: |
From MSDN:
Find (criteria, SkipRows, searchDirection, start)
Parameters
criteria A String containing a statement that specifies the column name, comparison operator, and value to use in the search.
SkipRows An optional Long value, whose default value is zero, that specifies the offset from the current row or start bookmark to begin the search.
searchDirection An optional SearchDirectionEnum value that specifies whether the search should begin on the current row or the next available row in the direction of the search. Its value can be adSearchForward or adSearchBackward. The search stops at the start or end of the recordset, depending on the value of searchDirection.
start An optional Variant bookmark to use as the starting position for the search.
Remarks
The comparison operator in criteria may be ">" (greater than), "<" (less than), "=" (equal), or "like" (pattern matching).
The value in criteria may be a string, floating point number, or date. String values are delimited with single quotes (for example, "state = 'WA'"). Date values are delimited with "#" (number sign) marks (for example, "start_date > #7/22/97#").
If the comparison operator is "like", the string value may contain "*" (one or more occurrences of any character) or "_" (one occurrence of any character). (For example, "state like M_*" matches Maine and Massachusetts.)
|
The major difference between this and the Flexgrid.Textmatrix is that the record pointer is changed with find, so if you need to go back to it you'll have to bookmark it before the find. There's a strong implication that you can only have a single criteria, they don't specify AND or OR as allowable comparison operators so I suspect you'd have to requery with an appropriate WHERE clause if you wanted a more complicated search.
Hope this helps
Regards
Doug |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|