Re: What to use for ADO parameter type and size




"RB Smissaert" <bartsmissaert@xxxxxxxxxxxxxxxx> wrote in message
news:OV7c9GH0HHA.1168@xxxxxxxxxxxxxxxxxxxxxxx
Can be single can be multiple.
G2 is a code for hypertension and one patient could
have more than one of these entries.

I was going to suggest using a Record object in combination with a Command
object.
Depends if the Interbase provider supports output parameters.
You lose the overhead of constructing a rowset. It is about 15% faster for
single rows.
I do this when looking up large number of single rows that may or may not
exist.

At the very least you can lose one column

This can be

SELECT
ENTRY_ID,
READ_CODE,
ADDED_DATE,
START_DATE
FROM
ENTRY
WHERE
READ_CODE LIKE 'G2%' AND
(NOT DORMANT_FLAG = 1) AND
PATIENT_ID = 979

as you already know PATIENT_ID

The other possibility is to constuct a command object to take 5 PATIENT_ID's
and look up 5 at a time (beating Network traffic).

Stephen Howe


.