Programmer:Simple program to test connection to AutoCount Accounting
Under Construction |
Introduction
In order to connect to one of the account book in AutoCount Accounting, there are few steps to start with. To understand each of the step, a program is written to test the result of each step.
STEP 1. Create DBSetting STEP 2. Create SubProjectStartup STEP 3. Login to AutoCount Accounting
[ Download Sample Project] (Visual Studio 2015)
Sample project to test connection to AutoCount Accounting. |
DBSetting
DBSetting is one of the most frequently use class in AutoCount Accounting, whether it is plug-in or integrating system. Even when writing scripting for report script or application script, you may find the information of DBSetting is provided.
During its creation, two pieces of information is important, they are the server name and database name.
Namespace: BCE.Data
Create DBSetting with standard configuration
DBSetting object can be created with new operator, or via SubProjectStartupWithLogin method.
Below example code shows the DBSetting is created with new operator.
BCE.Data.DBSetting dbSetting = new BCE.Data.DBSetting(DBServerType.SQL2000, serverName, dbName);
- DBServerType which is the First parameter is always DBServerType.SQL2000, regardless of which Microsoft SQL Server version is being applied.
- Server name and database name can be obtain at the login screen of AutoCount Accounting.
Create DBSetting while specifying SQL sa password
BCE.Data.DBSetting dbSetting = new BCE.Data.DBSetting(DBServerType.SQL2000, serverName, "sa", "mYsApAsSwOrD", dbName);
- sa login password can be omitted when the password is using AutoCount default sa login password.
- Specify the sa password only when System Administrator has changed the sa password.
Success of created DBSetting does not justify whether the provided information connecting to SQL Server is correct. DBSetting merely hold the information that is essential to connect SQL Server. |
SubProjectStartup
Go to top
|
Resources For AutoCount Software Developers
|