The most flexible and easy connection automatic management of C/s mode database

Source: Internet
Author: User
Data | database
Problems faced by C/S mode database program distribution:
c/S development programmer when establishing a database connection, the connected database server is often fixed. (e.g. Provider=SQLOLEDB.1; password=123; Persist Security info=true; User id=sa;initial catalog=empl;data source=filesvr ") Here, FileSvr is the name of the computer where the SQL Server server is located. In the future, when you release the software, you must ask the client's server computer name to be FileSvr, which is a stiff, low-level problem-solving solution. Senior programmers solve this problem by using the Data source= variable, but here the variables need to be in the installer or application to write trouble code, trouble management, many people feel trouble or the pursuit of progress on the connection management function did not do, resulting in software maintenance problems and difficulties. The copyright control function master each has own solution, in all very troublesome. This provides a simple and versatile solution.
The COM (class DLL) CSManager.dll I developed has the following features
The connection automatically creates functionality. It automatically determines whether the information required for the database connection exists, interacts with the user automatically, saves and maintains the information, and provides the information needed to connect the program's database. Automatically determine whether a valid connection can be established with the database and indicate the possible cause of the failure. Since then, the DLL will automatically determine whether a database server can be used, no, it automatically pop-up dialog box to let you choose, automatically save. Each time it is run, it automatically detects whether the database server is connected, and if the connection is not there, it pops up the appropriate message or dialog box. Whether the network is smooth, the server is started, the server is paralyzed, it can adapt to processing. In this way, even if the primary server is paralyzed, the client program can normally use multiple database servers. The automatic Copyright Control feature, which can be limited by time and frequency, does not cause the user to change the system date or to install the software without losing the copyright control function. When overdue, it will automatically pop-up dialog box, which will show the author's contact telephone email copyright information.
The DLL Method property:
Automanage automatically manage the connection to the database server and determine whether to connect the automatic Copyright control function method limitdays software use days limit limittimes software usage limit Contactemail when the software is used more than the date or times limit, Users can contact the developer through the message. Contactphone Ibid., users can contact Databasecomputername selected database server name LoginName database user name Loginpassword database user password by phone and developer Showdialogform Change Login server login name login Password dialog box
Example: The following in VB program examples

Public databasecomputername as String (database server computer name)

Public LoginName As String (user name to log in to SQL Server)

Public Loginpassword As String (login password)
Private Sub Form_Load ()
Dim AA as New csmanager.service
Aa. Automanage
Aa. limitdays=100 limit users to 100 days
Aa. limittimes=5000 restricts users to use 5,000 times when more than one condition of the software is not available.

Aa. Contactemail = "Wang517@21cn.com" (Users can contact the author by email)

Databasecomputername=aa. Databasecomputername

Loginname=aa. LoginName

Loginpassword=aa.loginpassword

(The above three variables can establish a valid database connection, do not need me to wordy)

Set AA = Nothing

End Sub









Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.