on 04-03-2014 8:02 AM
Hi experts,
I'm having problem with a Web Service which execute DI API commands.
During the initial company.connect I'm using the following basic code:
oCompany = New SAPbobsCOM.Company
oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008
oCompany.LicenseServer = "ServerName:30000"
oCompany.Server = "ServerName:30000"
oCompany.CompanyDB = "DBName"
oCompany.DbUserName = "SA"
oCompany.DbPassword = "password"
oCompany.UserName = "manager"
oCompany.Password = "password"
oCompany.UseTrusted = False
dConnInt = oCompany.Connect
If dConnInt <> 0 Then
oCompany.GetLastError(errcode, erMsg)
End If
It is working just fine in one server.
However when I try to migrate to another server, it always returns ErMsg 'Database server type not supported'.
I have tried to install SQL 2008 R2 Native Client and the DIAPI, but the error remains.
I also have compared the installed "program and features" between the existing and the new server, all identically the same.
Have anyone encounter the same issue? Please advise what should I do to resolve this.
Thanks
Best Regards,
Krisma
Hi Krisma,
which DI API Version are you using ( old & new server ) ? My first idea would be, that you have an older version on the new machine, which doesn't support MSSQL 2008 yet.
regards,
Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krisma,
can you please try the connect without sending DbUserName+DbPassword
oCompany = New SAPbobsCOM.Company
oCompany.Server = "ServerName"
oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008
oCompany.CompanyDB = "DBName"
oCompany.LicenseServer = "ServerName:30000"
oCompany.UserName = "manager"
oCompany.Password = "password"
dConnInt = oCompany.Connect
regards,
Maik
Hi Krisma,
Not sure if this is related to your problem.
When installing DI API 32 bit, you will get a folder called \SAP\SAP Business One DI API\DI API 89
When referencing this SAPbobsCOM89.dll, and connecting using the stand alone DI API, I always get this error 'Database Server type not supported.'
Just make sure you are not referencing this SAPbobsCOM89.dll
Regards
Edy
Hi Edy,
In my case, the reference is not being taken from that folder, but it is taken from the Development PC.
Some update to the issue, I have tested to do the following and they are working:
-. SQL connection (not DIAPI connection) via Web Service.
-. DI API connection using the same code, but compile the program as .exe instead of web service.
-. DTW can do the connection.
I believe it indicates that the issue lies with DIAPI connection via Web Service.
Any idea, anyone? I have been checking lot of reference but cannot find anything useful yet.
Best regards,
Krisma
Hi Krisma,
I had a similar case like you and the solution was related to IIS. Like in your case, everything works fine in case when I used a console application to connect to DI API, but through web service I had always the error - "Database server type is not supported".
This is the solution that works in our case:
1. Go to IIS->Application pools
2. Rigth click on your service->Advanced settings
3. Go to Identity->Choose a custom account->add an administrator account
4. Go to Load User Profile-> set True
5. Restart IIS
Regards,
Ion Gritco
oCompany = New SAPbobsCOM.Company
oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008
oCompany.LicenseServer = "ServerName:30000"
oCompany.Server = "ServerName:30000" <--- You don't need to put the PORT 30000. Ex : "localhost"
oCompany.CompanyDB = "DBName"
oCompany.DbUserName = "SA"
oCompany.DbPassword = "password"
oCompany.UserName = "manager"
oCompany.Password = "password"
oCompany.UseTrusted = False <--- "By default this method is set to false"
dConnInt = oCompany.Connect
If dConnInt <> 0 Then
oCompany.GetLastError(errcode, erMsg)
End If
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krisma,
Check the SQL Server Versions on both the servers. I hope there is some version mismatch thats why you are getting the error.
Hope it helps.
Thanks & Regards
Ankit Chauhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krisma,
The error refers to the actual database version, not the sql native client.
Please check that the SQL Server version is 2008 on both servers.
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Johan,
Let me elaborate more on the situation.
Server A : SAP Server and Database Server
Server B : Existing Web Server where the web service is working properly.
Server C : New Web Server where I'm trying to deploy the same web service from Server B.
The issue only happen in Server C, while as far as I checked, the IIS setting and the 'Program and Features' are identical between server B and C.
Best regards,
Krisma
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
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.