Programmer:Simple program to test connection to AutoCount Accounting v2: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 15:
 
==UserSession and DBSetting==
'''UserSession''' and '''DBSetting''' are the most frequentlyfrequent useduse 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.<br />
UserSession and DBSetting are required by almost all transactions and documents when accessing to AutoCount server.<br />
Line 27:
Below example code shows the DBSetting is created with new operator.
<syntaxhighlight lang="csharp">
BCEAutoCount.Data.DBSetting dbSetting = new BCEAutoCount.Data.DBSetting(DBServerType.SQL2000, serverName, dbName);
</syntaxhighlight>
 
* 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 "[[Programmer:Create BCEAutoCount.Data.DBSetting with Database Info|Create BCEAutoCount.Data.DBSetting with Database Info in AutoCount Accounting 12.80]]".
** Manually, at the login screen of AutoCount Accounting.
::[[File:ProgramLoginForm.png|450px|link=]]
<br />
===Create DBSetting while specifyingspecify SQL Server sa password===
<syntaxhighlight lang="csharp">
BCEAutoCount.Data.DBSetting dbSetting = new BCEAutoCount.Data.DBSetting(DBServerType.SQL2000, serverName, "sa", "mYsApAsSwOrD", dbName);
</syntaxhighlight>
* sa login password can be omitted when the password is using AutoCount default sa login password.
Line 47 ⟶ 46:
<br />
 
<!--
==SubProjectStartupWithLogin==
*When using '''SubProjectStartupWithLogin''' it does the following tasks:
Line 135:
}
</syntaxhighlight>
-->
 
<br/>