Subject: | |
From: | |
Reply To: | |
Date: | Fri, 26 May 2000 08:10:26 +0200 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Thanks a lot for your answer, you explains are very clear and very helpfull.
I have still a little problem. Everything works till the SQL string.
I have the following error message (translated from the french):
Execution error "3146"
ODBC -- Call aborted
My database DBFB01 is attached to the DBENVIRONMENT DBDBE on the HP3000
The DSN "BASES HP3000 REXOR" is attached to the DBENVIRONMENT DBDBE.
The Open Database Works, with my DSN (don't need password because they are
configured in the ODBC)
I would like to acced to my database DBFB01, set FREMDB-D, using the DSN
"BASE HP3000 REXOR"
Best Regards,
Fabien Visini
Rexor
You will find below the code I tried:
Private Sub Connect2_ODBC()
Dim DAOWS As DAO.workspace
Dim DAORS As DAO.Recordset
Dim DAODB As DAO.Database
Set DAOWS = CreateWorkspace("NewJetWorkspace", "admin", "", dbUseJet)
Set DAODB = Workspaces(0).OpenDatabase("", dbDriverComplete, True,
"ODBC;DSN=BASES HP3000 REXOR;")
Set DAORS = DAODB.OpenRecordset("Select * from DBFB01.FREMDB_DB where
BUCHG_DAT=20000524;", dbOpenDynaset, dbSQLPassThrough))
While Not DAORS.EOF
Debug.Print DAORS![RG_NR]
DAORS.MoveNext
Wend
Close Resultset
DAORS.Close
DAODB.Close
End Sub
Where is the problem..???
|
|
|