SAP Business One PHP Connectivity

Hi,
When I use this code, I get the return code as -111. Please let me know where I can be going wrong.
<?php
$vCmp=new COM("SAPbobsCOM.company") or die ("No connection");
$vCmp->server = "(local)";
$vCmp->CompanyDB = "sbodemo_US";
$vCmp->username = "manager";
$vCmp->password = "manager";
$lRetCode = $vCmp->Connect;
echo " The success code is " .$lRetCode.
?>
Thanks for your help.

Hi Verma,
Welcome to the Forum
Try This......
' In Vb.net
Dim ocompany As New SAPbobsCOM.Company
        ocompany.DbServerType = BoDataServerTypes.dst_MSSQL2008
        ocompany.Server = "servername"
        ocompany.UseTrusted = False
        ocompany.DbUserName = "sa"
        ocompany.DbPassword = "sa password"
        ocompany.CompanyDB = "SBODemoIN"
        ocompany.UserName = "manager"
        ocompany.Password = "manager"
        lretcode = ocompany.Connect
        If lretcode <> 0 Then
            ocompany.GetLastError(lerrcode, serrmsg)
            MessageBox.Show(serrmsg)
        End If
        MessageBox.Show("connected successfully")
-111 means Invalid Memory Access
Thanks
Shafi

Similar Messages

  • Cannot connect SAP Business One with iPad

    Hey all,
    I am new to SAP Business One. And i am exploring SAP Business One Mobile Applicaiton for iPad.
    I've tried to follow the step to set up my both SAP Business One and iPad but failed.
    The message "Connecting to server" keep loading and after few minutes show me "Tje request timed out (-1001)"
    So am I did something wrong? Or miss out something?
    Please advice with this problem.
    Thank you.
    Regards,
    Wai Leng

    Hey Lisa,
    Yes, I've tried what I found in this forum and the Support Portal.
    But it's is failed again.
    As iPad doesn't really need a mobile phone number, so i just simple key in a number for both SAP B1 and my iPad. Is it any problem?
    Another question, I've tested my connection for B1D1, but failed, following is the error message.
    com.sap.b1i.adapter.dia.exception.ConnectionFailedException: Connect to Business One failed.
    (-107) Unable to connect with the specified username and or password
    Anything i miss out?
    Thank you.
    Regards,
    Wai Leng

  • SAP Crystal Reports data source connection problem using sap business one

    Hi,
    I m facing a problem regarding: SAP Crystal Reports data source connection problem using sap business one
    I am trying to create a Crystal report but when I try to configure a new connection it does not work.
    I select Sap Business One data source and try to complete the information required to connection but it does not list my companies databases, what is the problem?
    Our Current SAP related software details are as follows:
    OS: Windows Server 2008
    SAP B1 Version: SAP B1 9 (902001) Patch 9
    SAP Crystal Report Version: 14.0.4.738 RTM
    Database: MS SQL Server 2008 R2
    I have also added some screenshots of the issues.
    Please have a look and let me know if you have any questions or any further clarifications.
    I m eagerly waiting for a quick and positive reply.

    Hi,
    There is problem with SAP Business One date source.
    I had faced same problem, I used OLEDB Data-source, and it worked fine for me.
    So, try to use OLEDB.
    Regards,
    Amrut Sabnis.

  • Error Connecting SAP Business One and Crystal Report

    Hi All,
    I installed Crystal Report 2008 on my system for creating a report in Crystals.
    I clicked on "New Report" and it opened a window called "Database Exert." However, when I look in the Database Expert, I cannot see "SAP Business One" in it. How can I connect SAP Business One 8.8 with Crystal Report?
    Regards,
    Bharath S

    Hi
    On your computer, locate the Crystal folder according to the following directory path: C:\Program Files\SAP\SAP Business One\Crystal. Then double-click the file: SAP Business One Crystal Report Integration Package.exe. and follow the step of the setup status screen.
    Regards
    Christian Carrasco

  • There is a problem with the server's security certificate. The security certificate is not from a trusted certifying authority. SAP Business One is unable to connect to the server

    Hello,
    I have an issue with connecting client SB1H on Windows, the scenario is as follows:
    1.- Server:
         Suse Linux Enterprise Server 11.3 kernel version: 3.0.76-0.11 IBM
         NDB and Server are review 69 SP06
    2.- Client:
         Windows 8 Pro Virtual Machine on Microsoft Hyper-V
         SB1H PL 11 version 32bits    
         SAP HANA Studio version 1.0.60
    When I run SB1H the following message appears:
    There is a problem with the server's security certificate. The security certificate is not from a trusted certifying authority. SAP Business One is unable to connect to the server.
    Any idea what could be the solution?

    Hi,
    Please check SAP notes:
       1993392 - Server components setup wizard: New default values for certificates and single sign-on option
    1929288 - Do not configure SSL for XApp during installation or upgrade if XApp is installed on a different machine than the SAP HANA server
    Thanks & Regards,
    Nagarajan

  • Unable to create new connection using SAP Business One

    Hi all,
    I am unable to make a connection using the new SAP Business One connetion provided with the 8.8 release of SAP Business One Crystal Report Integration Package.
    There are no Companies available to select from.  When I try to manually type in the company name, the logon fails.  If I then press "Cancel", I get a message that Crystal reports encountered a problem and needs to close.  The details of the error refers to the following DLL: crdb_b1.dll.
    The connection is successful from another PC that only has the Client installed (and uses the License server on our server, which also contains the databases.)
    I have a local installation with my own license server.  I am not even able to connect to the database on my local PC.
    Please can anyone explain why this isn't working?
    Regards,
    Rikard

    Hi Rikard,
    You may get better help if you post your question to the Business One forum. I can' t move your post.
    Thank you
    Don

  • Get SAP Business One connection

    Hi all.
    I'm creating a report using Crystal Reports Basic 2008 for SAP Business One and I have a question.
    Our client has three databases under one server, so, I'm creating three reports and i'm conecting them under a UDL file.
    My question is if it's possible to get the actual SAP Business One connection when the report is call? Because this way, I can only make a report instead of three.
    I hope I was able to express myself best. I'm thank you and i'm waiting. Thanks.
    The system have:
    Windows Server 2008 SP2
    SQL Server 2008
    SAP Business One 8.8 PL 11
    Crystal Reports Basic 2008 for SAP Business One 12.1.0.892

    Hi,
    I don't think that is possible since the sequence to run CR is after connecting to a specific database.
    Thanks,
    Gordon

  • Fail to connect DB via DI-API on SAP Business One 9.0 for HANA

    Hi,experts.
    I am coding a sample program using VB.net on SAP Business One 9.0 for HANA.
    But this problem fail to connect DB.
    The code relevant to connect DB is below.
    ============================================-
    SAPbobsCOM.Company.DbServerType = 6
    SAPbobsCOM.Company.Server = ServerName:30015
    SAPbobsCOM.Company.UseTrusted = False
    SAPbobsCOM.Company.DbUserName = SYSTEM
    SAPbobsCOM.Company.DbPassword = ********
    SAPbobsCOM.Company.CompanyDB = CompanyDBName
    SAPbobsCOM.Company.UserName = manager
    SAPbobsCOM.Company.Password = ********
    ' Connecting to a company DB
    RetCode = SAPbobsCOM.Company.Connect
    ============================================
    (Result)  RetCode = False
    (Expected result) RetCode = True
    I think this is a commonly difinition on SAP Business One for HANA.,
    but I can not find any useful information...
    Could you give me advice about this problem?
    Best regards,
    Yuka Masuda

    Thank you for your reply, Maik.
    I changed DbServerType from 6 to 9,
    and the program works!!
    I appreciate your useful information.
    Thank you.
    Best regards,
    Yuka Masuda

  • XL Reporter error Unable to Connect to SAP Business One DI API

    Hi Experts,
    Im getting this error on one of our clients' workstations.
    They have SAPB1 2005A PL 31.
    We've tried uninstalling and reinstalling the DIAPI and the whole client application as well.  Same error.
    It als gives an error after the initial error that says:
    "Security Settings in Microsoft Excel prohibit XL Reporter from running."
    Any suggestions?
    Thanks!

    hi jairus,
    To fix this XLR error 'unable to connect to SAP Business One DI API', do the following:
    1. Go to control panel and uninstall SAP DI API
    2. Run %temp%
    3. Rename the folder SM_OBS_DLL
    4. Go to the patch level package of the patch level you are using and install DI API. If you get a message that the installation already exists, ignore the message and proceed to install DI API.
    XLR should work properly.
    Best Regards,
    David

  • Error Starting XL Reporter - Unable to connect to SAP Business One DI API

    Hi Experts,
    I am getting the error message...
    Unable to connect to SAP Business One DI API
    [SAP Business One DI API]
    Internal error (-8006) occurred [131-183]
    ...when trying to start XL Reporter on one client PC.  Until today, it has been working OK.
    What needs to be done?
    Thanks
    Greig

    Hi Gordon,
    I thought that might be the answer.  Are there any set instructions for a 'clean' client uninstall?
    Thanks
    Greig

  • How to connect crystal report 2013 using sap business one data source

    hello Professionals .
    when i try to use data source sap b1 in crystal report 2011 or 2013 i got no list in company database,
    when i try to write it manual i got error "Connection failed".
    I tried to connect OLE DB and ODBC all work fine with me.
    i attached some snapshots .
    Any Advice Please ?

    Hi Mohamed,
    Please check below link.
    SAP Crystal Reports 2011/2013 doesn't show Company Data Base
    SAP Business One Data Source in Crystal
    Crystal Reports - How To - Connecting to your SAP Database - YouTube
    Migrating Crystal Reports of SAP Business One from SQL Server to SAP HANA
    Hope this helps
    Regards::::
    Atul Chakraborty

  • DI-API Error Company Connect with SAP BUSINESS ONE 2004 - B 7.30.215

    Hi,
    I am using SAP BUSINESS ONE 2004 - B 7.30.215. But in the COM window of the Visual Studio.net is having only
    SAPbobsCOM 6.2 and 6.5.
    While executing the DI connecting program It is showing an error
    the error is -2028 (without description)
    I need to add any patches to connect to company?
    help me..
    Regards,
    Jay

    Hi Jay,
    Here's a post that also refers to the same question you asked.
    Need Help in DIAPI
    Is your problem with the connection? Have you tried to connect using the Data Transfer Workbench? Where do you get this error -2028? Please post your code so we can see what the problem is.
    Adele

  • Wrong User name or Password while connecting from SAP Business One - PL26

    I have restored my database on the server.I am using Patch Level PL26
    I am getting an error while logging to Server
    Wrong username and password....Message [131-93]
    Is it because i have not imported the Temporary Liscence.But when i work on my laptop, it doesnt give me an error with the same username and Password.
    I have checked SAP B1 Suite Service Manager also......it is "ON".
    Can you please give me an help on this issues, why is it giving this error
    OR
    Is there a problem in my SAP Business One Server installation
    Steps i have followed to install the SAP Busines One Server
    1 - PL26 - Packages - Server Tools - Setup
    2 - SAPB1 - Packages - Server - Setup (Custom - Demo-India
    3 - Client - setup
    4 - PL26 - Packages - DIAPI - Setup
    Not installed -
    5 - Packages - Upgrader Common - Setup
    Reason - I have been told that until and unless you import liscense, you cannot run Upgrader Common Setup.
    Please if you can find out is this true ?
    Is the problem coming because i have not run the Upgrader Common setup ?

    Hi Khimesra,
    Could you please try the following:
    1 - Firewall/antivirus disabled                                   
    2 - B1 uninstalled                                                
    3 - Net 1.1 installed                                            
    4 - B1 reinstalled                                                
    Please also refer to the following SAP notes:
    546344 and 542690
    Regards
    Emanuel

  • Creation of Add-on package for 64 bit and 32 bit SAP Business One Client

    Please help me creating package for 64 bit and 32 bit SAP Business One. If Add-on executable is compiled with x86 option then there is no issue of connecting Add-on with 32 bit SAP Business one and if Add-on executable is compiled with Any CPU option then there is no issue of connecting Add-on with 64 bit SAP Business one. Problems are mentioned as below
    1. My Add-on uses MS ACCESS connection and the connection is read using Jet OLEDB 4.0 provider. It works fine for x86 compile mode but not when compile mode is Any CPU. I searched for the issue on Google and found a solution to change MS ACCESS connection provider to ACE.OLEDB.12.0 but again ACE provider is installed according to the Office version i.e. 32 bit or 64 bit office suite. If I install 32 bit ACE provider then Add-on executable compiled with x86 version is working fine but with Any CPU option throws error as provider is not registered on current machine.
    2. Secodly, our license validation activex dll is build using vb 6.0 and therefore when Add-on executable is compiled using Any CPU option, Add-on EXE cannot read from license dll. Any suggestion, how the activeX dll can be compiled whose component can be created from for X86 compiled exe and any cpu compiled exe.
    Please help because we are stuck in this issue and cannot move forward.
    Thanks.

    Hi Alejandro,
    That is one solution but did your add on used ms access connection? if you used Jet oledb to connection string or ace oledb connection string? what if 32 bit office is installed and what if 64 office is installed? how did you found the office version in install script? after determining the office version how did you installed Microsoft redistributable for ace oledb (32 bit or 64 bi )?
    I am sorry that I asked many questions but these are the problems where I am stuck with the addon installer?
    Thanks

  • "No data" in SAP Business One

    Hi,
    We have encountered the following issue.
    Using the SAP mobile application (version 1.1.3 (Android) - 1.9.6 iOS)), we connect successfully to database but when we try to open the Business Partners and Items, a "No Data"  message appears.
    If I insert a BP in mobile, the SAP Business One show these BP that I insert, but in the App I have the message "No data".
    What could be causing that?
    Thank you everyone

    Hi Louran,
    Please check below links.
    SAP B1 Mobile Application 1.3.1 - Version too old
    http://help.sap.com/download/businessone/mobileapp/B1_MobileApp_1.9_Guide.pdf
    Hope this help
    Regards::::
    Atul Chakraborty

Maybe you are looking for

  • Automatically add a dynamic property to a newly created table

    hi, how can i customize data modeler so that whenever a table/entity is created, a dynamic property named myprop1 is attached to it. and further more, i hope this dynamic property be included in the generated reports. thanks.

  • Developers access to apps database user(Best Practice)?

    Hello all, I'm trying to understand a developers need to have access to the "apps" database user. The arguent can be made that the need is there for all development efforts, but is that really the case? Should all updates/changes by the "apps" user b

  • Adding voice channels to a trunkgroup

    I have this: controller T1 2/0 framing esf linecode b8zs pri-group timeslots 1-24 description Connection to Switch T1 2 controller T1 2/1 framing esf linecode b8zs pri-group timeslots 1-24 description Conecction to the switch T1 18 It happens that so

  • Integrating  Java with MQ.

    My program requirement is that I should be able to insert and delete the messages in the Websphere Message Queue (MQ) through pure Java code . This MQ is used in the MiddleWare Technologies to read and write into the XML file . Then I will be using R

  • My brand new iMac keeps freezing?

    Hi, I have an iMac 27" late 2013 model, running OS 10.9.4, with 3.5 GHz i7, 32 GB of RAM and a 3 TB SATA hard disk drive (with 2.18 TB of storage remaining). I bought it less than 2 months ago from the Apple Online store, and have been using it up un