problem attaching ODBC tables with Oracle 9 driver

  • Thread starter Thread starter SonLino
  • Start date Start date
S

SonLino

Hi,

I have been trying to attach an Oracle table from Access 2000 DB without any
success. Each time I try to do it, I get a MS Jet Error 3011. Table not
found.
The same code source (displayed below) works fine on Oracle 8 or SQL server
tables. Maybe the problem is the ODBC Oracle Driver.
(version 9.02.00.00) but when I repeat the operation by using Access and its
functions (right click and "attach tables" on the "Tables" menu), it works
fine too.

AnyOne has any idea?



The code I have been using is:

Function pcmAdjTablaODBC()
On Error GoTo AdjTablaODBC_Err

Dim db As Database
Dim tdef As TableDef
Dim strConnect As String

Set db = CurrentDb()
'strConnect = "ODBC;"
strConnect =
"ODBC;DSN=lmn_Oracle;UID=USUARIO;PWD=PASSWORD;DBQ=LMN;DBA=W;APA=T;EXC=F;FEN=
T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;GDE=F;FRL=F;BAM=IfAllSuccessful;MTS=F;MDI=
F;CSR=F;FWC=F;PFC=10;TLO=0;"

Set tdef = db.CreateTableDef("pruebas")
tdef.Attributes = DB_ATTACHSAVEPWD
tdef.Connect = strConnect
tdef.SourceTableName = "Rutas"
db.TableDefs.Append tdef

AdjTablaODBC_Exit:
Exit Function

AdjTablaODBC_Err:
MsgBox "Error: " & Str(Err) & " - " & Error$
Resume AdjTablaODBC_Exit

End Function
 
don't use mixed case in table names. Use upper case. That is probably the
problem.
Jim
 
You are right,

Thanks a lot,

Lino

Jim Kennedy said:
don't use mixed case in table names. Use upper case. That is probably the
problem.
Jim

"ODBC;DSN=lmn_Oracle;UID=USUARIO;PWD=PASSWORD;DBQ=LMN;DBA=W;APA=T;EXC=F;FEN=
T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;GDE=F;FRL=F;BAM=IfAllSuccessful;MTS=F;MDI=
 
Back
Top