on 04-08-2010 5:01 PM
我在Addon中,通过DI 来连接公司库,代码如下:
//连接公司
SAPbobsCOM.Company oCompany = new SAPbobsCOM.Company();
oCompany.UserName = "manager";
oCompany.Password = "manager";
oCompany.Server = "127.0.0.1";
oCompany.CompanyDB = "SBODemoUS";
oCompany.DbUserName = "sa";
oCompany.DbPassword = "123456";
oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English;
int lRetCode = oCompany.Connect();
if (lRetCode != 0)
{
int temp_int = 0;
string temp_string = "";
oCompany.GetLastError(out temp_int, out temp_string);
}
连接失败,出现错误: 错误号: -125 错误信息: No database server type specified
SBO版本为8.0 ,请问为何种原因?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
没有指定数据库类型,加上这句:
oCompany.DbServerType = 你的数据库类型
如果是SQL Server 2005, 那么是BoDataServerTypes.dst_MSSQL2005
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.