M
Mr. B
Still rather new to DB and ADO (but slowly gaining ground)... I've two
questions...
First deals with Filtering an OleDbDataAdaptor... I've such a beast and I've a
single query for it:
SELECT Employee, ID, Period_End_Date, Units, [Date] FROM tblTimeEntry WHERE
(Employee LIKE ? + '%')
Simple enough. And I can do my FILL via something like:
Dim strUserID As String ' User Name Filter
strUserID = UCase("feu001")
daTimberline.SelectCommand.Parameters(0).Value = strUserID
daTimberline.Fill(dsTimberline.tblTimeEntry)
What I'd like to know is HOW to do a query with TWO (2) queries. Say User
Name (as above) _and_ something else (say User ID Number)?
I 'think' in the Select's WHERE is where I do an 'ABC and 123' kinda query
(true?)... but I'm not sure. Then how on the SelectCommand line do I query
both items?
Second Item deals with 'whats the proper way' (or doing it the right way)...
My application deals with 2 Access Db's. My question is: Should one try to
keep the number of DataSets down? In other words, load the two DB's fully
(one per DS)... and deal with them as best as you can. Or create the DataSets
as much as you want as you need them?
I'm concerned that having too many DataSets will slow down loading performance
(right now I've 4 of them... and hope to reduce to 3 once I figure things out.
Thanks in advance...
Bruce
questions...
First deals with Filtering an OleDbDataAdaptor... I've such a beast and I've a
single query for it:
SELECT Employee, ID, Period_End_Date, Units, [Date] FROM tblTimeEntry WHERE
(Employee LIKE ? + '%')
Simple enough. And I can do my FILL via something like:
Dim strUserID As String ' User Name Filter
strUserID = UCase("feu001")
daTimberline.SelectCommand.Parameters(0).Value = strUserID
daTimberline.Fill(dsTimberline.tblTimeEntry)
What I'd like to know is HOW to do a query with TWO (2) queries. Say User
Name (as above) _and_ something else (say User ID Number)?
I 'think' in the Select's WHERE is where I do an 'ABC and 123' kinda query
(true?)... but I'm not sure. Then how on the SelectCommand line do I query
both items?
Second Item deals with 'whats the proper way' (or doing it the right way)...
My application deals with 2 Access Db's. My question is: Should one try to
keep the number of DataSets down? In other words, load the two DB's fully
(one per DS)... and deal with them as best as you can. Or create the DataSets
as much as you want as you need them?
I'm concerned that having too many DataSets will slow down loading performance
(right now I've 4 of them... and hope to reduce to 3 once I figure things out.
Thanks in advance...
Bruce