Each has it's advantages and
disadvantages. In general DDE is suitable for simple requirements
but ODBC should be given serious thought if the limitations of DDE
become too restrictive.
DDE
Advantages
- No need to set up A Data Service Name (DSN). A DDEShareName is
required for Network DDE however.
- Can call Access Macros & Functions.
- Can utilise the CPU power of a remote computer, via Network
DDE.
Disadvantages
- Recordsets with Rows that exceed the maximum Cicode string
length cannot be read directly.
- Rows (records) are returned to string variable with TAB
characters between Columns. The user must parse the string in
Cicode to obtain the Column (field) values.
- SQLs cannot perform Actions (such as INSERT, UPDATE or
DELETE).
ODBC
Advantages
- MS Access does not have to be running. ODBC uses the JET Engine
DLL on the same PC. This an advantage in many ways but can consume
excessive PC resources if not managed properly.
- Large SQL statements can be broken into chunks.
- SQLGetField makes easier to get data from fields (Columns).
There is no need to parse the data in Cicode.
- Can handle large numbers of fields (Columns) in the
recordset.
- SQLs can perform Actions (such as INSERT, UPDATE or
DELETE).
- MsgRPC, Reports or Events code triggered by PLC bits can be
used to execute ODBC calls on a remote PC running Citect.
Disadvantages
- Requires that ODBC and a Data Service Name (DSN) be set
up.
|