跳至主內容

搜尋

搜尋

評論

2 條評論

  • Avatar
    Shotaro Ito
    Hi Dav,
    Unfortunately BarTender doesn't support switching OLEDB/ODBC database programably.
    What you can change is user name and password to connect.

    One alternative is, use ODBC connection.
    Since ODBC connection is defined by Windows (not in BarTender format),
    you can modify ODBC datasource to switch database to connect.
    ODBC datasource can be created by ODBC administrator of Management tools.

    You can create File DSN and modify the file programablly

    XL: How to Use File DSNs and DSN-less Connections
    http://support.microsoft.com/kb/165866

    Or - you can play with registry to create / modify System / User DSN. (risky way, I'd say)

    Can I Create and Delete a DSN Using a Script?
    blogs.technet.com/b/heyscriptingguy/archive/2004/11/10/can-i-create-and-delete-a-dsn-using-a-script.aspx

    Hope that helps!
    0
  • Avatar
    Legacy Poster
    Hi dav,

    On my case, is not a solution store on any resource the connection string to my production database and/or production data. To fix this "lack of functionality" i did:
    - Modify my .btw file to use a .txt file as a datasource.
    - Modify my app to get data from my database (my application can change the datasource from developer to production enviroment by configuration! :o )
    - On my application, create and fill this txt file with the data and put it on a temp folder (The .btw file references it)
    - After send to print the data, my app deletes the txt file and everyones happy, no production data is stored on operation pcs.

    I hope this could help you.
    0

登入寫評論。