Run time error '3305'
Invalid connection string in pass through query
I have inherited an Access database which seems to be having problems connecting to an Oracle table. It successfully connects to the Oracle table in other Subs but the one having problems uses a different method to connect that I am not familiar with, if I debug it shows the line pasted below as being the problem:
qdf.Connect = "DRIVER={Oracle in OraHome92};SERVER=******;UID=******;PWD=******;DBQ=******;DBA=W;APA=T;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;FRL=F;MTS=F;CSR=F;PFC=10;TLO=O;"
in the following context:
Set qdf = dbs.CreateQueryDef("qUnique", strSQL)
qdf.SQL = strSQL
qdf.Connect = "DRIVER={Oracle in OraHome92};SERVER=******;UID=******;PWD=******;DBQ=******;DBA=W;APA=T;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;FRL=F;MTS=F;CSR=F;PFC=10;TLO=O;"
qdf.ODBCTimeout = 0
qdf.ReturnsRecords = True
' Open query in Datasheet view.
DoCmd.OpenQuery qdf.Name
Set RS = dbs.QueryDefs("qUnique").OpenRecordset
Whereas the following connection works fine:
strConnectString = "driver={Oracle in OraHome92};DBQ=******;UID=******;PWD=******; "
Set wrkODBC = DBEngine.Workspaces(0)
Set dbDW = wrkODBC.OpenDatabase("", False, True, strConnectString)
dbDW.Close
Any help is appreciated, if more info is required feel free to ask.
Invalid connection string in pass through query
I have inherited an Access database which seems to be having problems connecting to an Oracle table. It successfully connects to the Oracle table in other Subs but the one having problems uses a different method to connect that I am not familiar with, if I debug it shows the line pasted below as being the problem:
qdf.Connect = "DRIVER={Oracle in OraHome92};SERVER=******;UID=******;PWD=******;DBQ=******;DBA=W;APA=T;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;FRL=F;MTS=F;CSR=F;PFC=10;TLO=O;"
in the following context:
Set qdf = dbs.CreateQueryDef("qUnique", strSQL)
qdf.SQL = strSQL
qdf.Connect = "DRIVER={Oracle in OraHome92};SERVER=******;UID=******;PWD=******;DBQ=******;DBA=W;APA=T;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;FRL=F;MTS=F;CSR=F;PFC=10;TLO=O;"
qdf.ODBCTimeout = 0
qdf.ReturnsRecords = True
' Open query in Datasheet view.
DoCmd.OpenQuery qdf.Name
Set RS = dbs.QueryDefs("qUnique").OpenRecordset
Whereas the following connection works fine:
strConnectString = "driver={Oracle in OraHome92};DBQ=******;UID=******;PWD=******; "
Set wrkODBC = DBEngine.Workspaces(0)
Set dbDW = wrkODBC.OpenDatabase("", False, True, strConnectString)
dbDW.Close
Any help is appreciated, if more info is required feel free to ask.