How to programically create Oracle DSN in MSAccess Application
Hi All,
I have a couple MS Access 2013 applications. When the user opens the application, I need to check for and if needed create the DSN to link from MSAccess to Oracle 11g.
Has anyone done this before?
TIA,
Kathy
Sub CreateUserDSN()
Dim stAttributes As String
' Build the attributes string
stAttributes = "Database=CREATE_DSN_TEST" & vbCrLf & _
"Description=CREATE DSN TEST" & vbCrLf & _
"OemToAnsi=No" & vbCrLf & _
"Server=OURSERVERNAME" amp; vbCrLf amp; _
"Trusted_Connection=Yes"
' Create the DSN
DBEngine.RegisterDatabase "Oracle", "Oracle in OraClient 11g_home1", True, stAttributes
End Sub