I just have a ADO CNN connection active on sql server.
I have this two var:
Mydata As date
Mystring as String
I need to find if a pair of this two var are present in mytable based filed F1 (date filed) and F2 (string field)
example:
Mydata=18/06/2022
Mystring="123456"
F1 F2
19/06/2022 123456
18/06/2022 123456
21/06/2022 123456
in my case the relation is present in second row
i can use SEEK, .find or?
fast find in .... sql server table suggestion
-
- PlatinumLounger
- Posts: 4311
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 77584
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: fast find in .... sql server table suggestion
Mytable must have an index on F1 and F2.
Set the Index property of the recordset to the name of that index.
You can then use the Seek method.
Set the Index property of the recordset to the name of that index.
You can then use the Seek method.
Best wishes,
Hans
Hans