vba - Connection string syntax for Classic ADO / ODBC / Oracle 10g EZConnect -
I do not try to use different VBA projects using an Oracle 10G back end and ADO (2.8) and no TNS I am here. After various attempts, we have decided to include the simplest series of steps for a clean installation:
The problem I can not understand the syntax instant customer ODBC The driver, which is called "Oracle in MyTest" (quotation marks) in my ODBC driver list, is used to tell the ADO. MSFT uses the ODBC driver with ezDanact, as it is suggested that immediately does not do any better work before installing the client (which is not at all to say). But it is possible, in fact, seems to suggest without suggesting it, and only tells you that the data source portion of the string, such as someUser / SomePassword @ AServer, appears: portnumber / InstanceName
Short version: What is the exact syntax of a classic ADO connection string, refers to a quick customer ODBC driver?
Thank you in advance for your help, I took a stupid long time to keep walking so ...
'user1206604 is similar to the answer - I will set up an ODBC connection using the ODBC Data Source Administrator (for example, we will name it,' Demo ') and this Connect the way:
Dim Conn New ADODB.Connection Set Conn = As New Adodb Connection connStr = "provider = OraOLEDB.Oracle; data source = demo; user id = yourUserID; password = yourPassword;" Conn.Open connStr slow api new ADODB.Recordset set API = New ADODB.Recordset yourQueryString = "select foo from the tab" api.Open yourQueryString, Con, adOpenDynamic, adLockReadOnly 'while not needing api.EOF Setting up the 'make things interesting' clean up the up 'API' here. Close Set API = None. Do not set conn = nothing
The Odbi Data Source Administrator (on my machine) is found in the Start menu> Program> Oracle - oraClient10g> Configuration and Migration Tools> Microsoft ODBC Administrator and It looks like:
Comments
Post a Comment