I'm using this to connect to Oracle:
Set mDBConnection = New ADODB.connection
Dim Rett As String
Rett = "CONNECTSTRING=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)"
Rett = Rett & "(HOST=myhost)(PORT=1521))(CONNECT_DATA =(SERVICE_NAME = myservice)));"
Rett = Rett & "uid=" & mDBUser & ";"
Rett = Rett & "pwd=" & mDBPassword & ";"
MsgBox Rett
mDBConnection.Open "DRIVER={Microsoft ODBC for Oracle};" & Rett
This works fine if the password does not contain symbol @. If it does - I get this error:
[Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve the connect identifier specified
How I can escape this symbol? Maybe I should connect in a different way?
pwd=""" & mDBPassword & """;
– Florent B.@
sign) directly to your database? – Zac