ODBCLink/SE Reference Manual | Using ODBCLink/SE With ODBC Applications |
Connecting with RDO’s
1.DECLARE YOUR VARIABLES FOR THE CONNECTION
2.SET THE RDO ENIVROMENT
3.SET AND OPEN THE CONNECTION TO THE DATABASE
4.SET AND OPEN THE RECORDSET FOR THE TABLE
5.USE THE RECORDSET INFORMATION YOU NEED AND PROCESS IT ACORDINGLY
6.MAKE SURE YOU CLOSE ANY ODJECTS THAT YOU HAVE CREATED WHEN ERRORS OCCUR(OR WHEN EXITING)
1.Dim RDOEN As RDO.rdoEnvironment Dim RDOCN As New RDO.rdoConnection Dim RDORS As RDO.rdoResultset
Dim RDOCL As RDO.rdoColumn
2.'Create an RDO Environment and specify the type 'of cursor we want. The Client Side cursor seems 'to give the most accurate results.
Set RDOEN = rdoEngine.rdoEnvironments(0).CursorDriver = rdUseOdbc
3.'Open a connection to the database
Set RDOCN = RDOEN.OpenConnection(YOURDSN)
4.‘Open the table
Set RDORS = RDOCN.OpenResultset
(“Select * from Member.Membership”,rdOpenKeyset)
5.While Not RDORS.EOF
' Insert your query processing code here. RDORS.MoveNext
Wend
6.'Close resultset RDORS.Close
'Close db connection RDOCN.Close
ODBCLink/SE |
|
©M.B. Foster Associates Limited | 53 |