|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
database selection in deploymentI created customized application to Microsoft POS system. I am now
working on the installation package. Any one knows how to get the local sql database settings, and get user select database, so I can make necessary changes to the database ( create new tables, update some records etc.) to make my application work properly. Thanks Leanne "Leanne" <leann***@connectretail.com.au> wrote in message Hi,news:1162854296.337940.316470@b28g2000cwb.googlegroups.com... >I created customized application to Microsoft POS system. I am now > working on the installation package. Any one knows how to get the local > sql database settings, and get user select database, so I can make > necessary changes to the database ( create new tables, update some > records etc.) to make my application work properly. > > Thanks > Leanne > Microsoft POS uses MSDE 2000. You can query a given server for all instances of SQL Server using a combination of registry enumeration (for local instances) and SMO EnumerateAllSQLServers for remote servers. Once your user has chosen a candidate (from a list), you can then enumerate all databases on the server using the stored procedure "sp_Databases", allowing the user to choose one. Alternatively you can setup a registry key with a default server/instance and catalog name and read that when your application starts, allowing the user to change it using the previously mentioned enumeration methods to populate selection list boxes. It's also sometime useful to have a default stored procedure to call to check to see if the selected database is compatible with your application. I use a "Version" stored procedure, that returns a version record that returns a GUID along with other information, so I know whether or not I'm dealing with a database related to my application, or some other database that just happens to be attached to the SQL server instance I'm using. Hope this helps, Robin
Attach handlers to ToolStripMenuItems. Got stacked, Please Help
MDI gets FormClosing but non-Child forms also open do not. Query based on user input C# help!!! Challenge? [De-]Serialise a class derived from DataTable. Multithread Design Question Memory by user Getting an application to be on top of other applications Treeview - relative position Progress Bar |
|||||||||||||||||||||||