Programmer:Simple program to test connection to AutoCount Accounting v2
AutoCount Accounting 184.108.40.206 and higher
In order to connect to one of the account book of AutoCount Accounting 2.0, there are few steps to start with. To understand each of the steps, a program is written to test the result of each step.
STEP 1. Create UserSession & DBSetting STEP 2. Call (Create) SubProjectStartup STEP 3. Login to AutoCount Accounting 2.0
| (Visual Studio 2017)
Sample project to test connection to AutoCount Accounting 2.0.
UserSession and DBSetting
UserSession and DBSetting are the most frequent use classes in AutoCount Accounting 2.0, whether it is plug-in or integrate system. Even when writing scripting for report script and application script, you may find the object of UserSession and DBSetting are provided.
UserSession and DBSetting are required by almost all transactions and documents when accessing to AutoCount server.
Moreover, it provides methods such as GetDataTable(...), ExecuteScalar(...), ExecuteNonQuery(...) and more for programmer to access currently connected account book.
During its creation, two pieces of information is important, they are the server name and database name.
Create DBSetting with AutoCount default configuration
DBSetting object can be created with new operator, or via SubProjectStartupWithLogin method.
Below example code shows the DBSetting is created with new operator.
AutoCount.Data.DBSetting dbSetting = new AutoCount.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.
- To obtain available Server Name and Database Name:
- Programatically, you may refer to "Create AutoCount.Data.DBSetting with Database Info in AutoCount Accounting 2.0".
- Manually, at the login screen of AutoCount Accounting.
Create DBSetting while specify SQL Server sa password
AutoCount.Data.DBSetting dbSetting = new AutoCount.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 sa password has been changed.
|Success of created DBSetting does not justify whether the provided information connecting to SQL Server is correct.|
DBSetting merely store the information that is essential to connect SQL Server.
- A simple program to test connection to AutoCount Accounting 2.0
- A simple program to test connection to AutoCount Accounting 1.8/1.9
- Create BCE.Data.DBSetting with Database Info in AutoCount Accounting 1.8/1.9
- Invalid LCPDecryptFileException was unhandled
|Go to top
|Resources For AutoCount Software Developers