Welcome to Forums Sign in | Join | Help | Forums
in Search


Deploying plugins that use ADO

Last post 01-12-2007 11:05 AM by Mike Bradfield. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-12-2007 10:47 AM

    • David Zeidman
    • Top 25 Contributor
    • User Since: 2002
    • Posts 326
    • Organization: Zeidman Development
    • Products:  Blackbaud Direct Marketing, Blackbaud Enterprise CRM, The Information Edge, The Raiser's Edge

    Deploying plugins that use ADO

    I have a plugin that uses ADO to connect to the RE db. Previously I have hard coded the SQL Server user name and password. This implies that that username exists in SQL Server. Ideally I would like to create an install program that copies the plugins to their location and registers them (I have already done this) but also creates a user in SQL Server that I can use. Does anybody have any ideas or suggestions how I may do this? Thanks David Zeidman Development http://www.zeidman.info
    David Zeidman
    Zeidman Development
    http://www.zeidman.info

    Check out my RE API blog
    http://www.re-decoded.com
  • 01-12-2007 11:01 AM In reply to

    Deploying plugins that use ADO

    David, Depending on the version of SQL you will be using you can user either the sp_addlogin stored procedure or the CREATE LOGIN command to programmatically tell SQL to add a login. Your deployment application will still need an administrative password hard coded but the application itself will then be able to use whatever credentials you have supplied.
  • 01-12-2007 11:05 AM In reply to

    • Mike Bradfield
    • Not Ranked
    • Posts 3
    • Organization: Guide Dogs for the Blind Association

    Deploying plugins that use ADO

    Hi David One option is to make use of the oSQL command line utility that comes with SQL Server. Create a text file such as: CREATE LOGIN [LoginName] WITH PASSWORD = '[Insert Password Here]'; GO USE [Your Database Name]; GO CREATE USER [UserName] FOR LOGIN [LoginName (as before)] WITH DEFAULT_SCHEMA = [Any default Schema]; GO oSQL can then be called in more or less the following manner oSQL -S [ServerName] -U [UserName] -P [Password] -i <Input File Name> As you are unlikely to know the userid and password in advance, -E can be used instead to use Windows authentication: oSQL -S [ServerName] -E -i [Input File Name] The -E switch relies on the user installing the application having appropriate DBA permissions on the Server. If the plugin is being installed on the DB server then [ServerName] can be replaced with (local); otherwise the installation package should prompt to enter the appropriate SQL Server. Hope this helps [i]--- Edited at 1/12/2007 11:11:30 AM by Mike Bradfield[/i]
Page 1 of 1 (3 items)