I don't think you can do it from the Package and Deployment wizard.
You can either write a small program to create the ODBC datasource using API calls (lookup MSDN on SQLConfigDataSource) and call the program from the wizard.
eg.
SQLConfigDataSource( NULL,ODBC_ADD_DSN, "Excel File(*.xls)",
"DSN=New Excel Data Source\0"
"Description=New Excel Data Source\0"
"FileType=Excel\0"
"DataDirectory=C:\\EXCELDIR\0"
"MaxScanRows=20\0"
Or
You could create a registry file which inserts the correct registry entries for your ODBC connection. and run the registry file.
I also don't think you can do it from the Package and Deployment wizard.
An extension to Chris's point;
You can create a file dsn which you can then manipulate using INI file functionality to ensure the database location is correct.
No,
See attached file DSN for Sql Server, as long as you get the provider right
[oledb]
; Everything after this line is an OLE DB initstring
Provider=SQLOLEDB.1;Password=auxprd01sys;Persist Security Info=True;User ID=auxprd01;Initial Catalog=AuxPrd01;Data Source=NAMTLCOSTCO;Application Name=PBSMatch
No, it makes no odds what and where the database is as long as you know where it is (to point the DSN at it).
I would suggest creating a file dsn through your ODBC manager and having a look at the structure of the file since it correlates closely to the API call.
And you will get all the proper names for drivers etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.