|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Hi All,
I'm trying to open a JET connection to SAS (a statistical analysis package) from Excel VBA using the code below.
**************************************************** Dim wspSAS_Workspace As Workspace Dim dbSAS_Database As Database Dim rcdSAS_Recordset As Recordset
Set wspSAS_Workspace = CreateWorkspace("NewJETWorkspace", "admin", "", dbUseJet)
Set dbSAS_Database = _ wspSAS_Workspace.OpenDatabase("", dbDriverNoPrompt, , "ODBC;DSN=SASODBCConnection;")
*****************************************************
This works, but pops up a dialog box where I can choose the 'Machine Data Source' tab and my SAS connection. What I can't make it do is just select the SAS connection without asking.
Any ideas from anybody? This is driving me up the wall.
Thanks,
Neil.
|
|
Not to worry. A (long) Google trawl has sorted this one out.
For anyone who comes across the same thing you need to change the opendatabase line to
Set dbSAS_Database = _ wspSAS_Workspace.OpenDatabase("SASodbcConnection", False, True, "ODBC;")
Merry Christmas!
|
|
|