If you do an ODBC link, there should be a checkbox that asks if you want
the link to remember your login so that you don't get prompted all the
time.
As for ADO, here is some code you could try:
Dim conn As New ADODB.Connection, i As Long, j As Long
Dim Rst As New ADODB.Recordset, RS As DAO.Recordset
conn.Provider = "OraOLEDB.Oracle"
conn.ConnectionString = "Data Source=ccc" & _
";User ID=Steve;Password=tiger"
conn.Open
Rst.CursorLocation = adUseClient
Rst.Open "SELECT someDatefld FROM dbo.OracleTable WHERE someDatefld >=
TO_DATE('01-01-02', 'DD-MM-YY')", conn
'copy data from Rst to RS
...
Rst.Close
conn.close
The interesting thing about using Ado with Oracle (com ADO) is that you
reference the ODBC dsn (ccc in this example) as your datasource instead
of the server. If you have an ODBC dsn then the Oracle Client service
is obviously installed on your computer (which is the only way to get
the working Oracle ODBC driver). And to reference the Oracle table
correctly (dbo.OracleTable is an arbitrary table name) you need to set a
tableDef object variable to the ODBC linked table and do a debug.Print
tdf.SourceTableName to see what the table name actually is (usually
OracleServiceName.tablename)
Dim tdf As TableDef
Set tdf = CurrentDB.TableDefs("yourODBCoracleTable")
Debug.Print tdf.SourceTableName
One last note, pl Sql (oracle sql) uses slightly different syntax than
jet sql (or Tsql - sqlserver sql). You have to cast stuff (like
datefields - using To_Date function in PL sql).
Rich
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!