OCompany.Connect Error
Hello!
I trying connect to Company but "Connect" methot return code -> 107
All Company parametrs are correct (dbUser, dbPassword, dbType...)
-107: SQL statement not allowed for this instance
SQL statement not allowed for this instance
Please tell me what I do wrong?
Edited by: Vladimir Pochinko on Mar 4, 2009 1:21 PM
Vladimir,
I still think of a username/password error.
Have you tried
Public Function Connect() As Boolean
MySAP.CompanyDB = SAP_DATABASE
MySAP.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005
MySAP.language = SAPbobsCOM.BoSuppLangs.ln_Dutch
MySAP.Server = "#SERVER"
MySAP.UserName = "manager"
MySAP.Password = "xxxxx"
MySAP.UseTrusted = True
Dim cErr = MySAP.Connect
If cErr <> 0 Then
MyLog.Add("Not connected to SAP database [" + cErr.ToString() + "]", LogSeverity.Warning)
End If
Return MySAP.Connected()
End Function
Similar Messages
-
Error -222 in ocompany.connect() method
hiii all,
at the time of company connect, ocompany.connect() function returns value -222.
is it due to lack of share memory.
thanks in advance
regads
nirdesh panwarNirdesh,
Please see the following post which may help you debug the issue you are having ...
company.connect -222 errorcode meaning
Eddy -
Connection error in GetDICompany
Hi Experts
I want to use multiple AddOn connection type. When I am using GetDICompany function, it is giving error explicit type conversion error
code is
SAPbobsCOM.Company oCompany = default(SAPbobsCOM.Company);
oCompany = SBO_Application.Company.GetDICompany();
Regards
JitenderHi Jairo,
Try using the old way first :
SAPbobsCOM.Company oCompany = new SAPbobsCOM.Company();
string sCookie = oCompany.GetContextCookie();
string sConnectionContext = eCommon.SBO_Application.Company.GetConnectionContext(sCookie);
int SetConnectionContext = oCompany.SetSboLoginContext(sConnectionContext);
oCompany.Connect();
My experience is that the old method will give you a more clearer human understandable error message .
Once you have corrected the problem, then move it to the new GetDICompany method.
Regards
Edy -
Hi All,
I am conneting the DB theu the following code.. It is working fine for some databases,but same code will throw an error for some other databases..but previously it was working fine. but after some time it throws the following error
<u><b>" Attempted to read or write protected memory. This is often an indication that other memory is corrupt"</b></u>
<u>Code is below:</u>
Private Sub ConnectToCompany()
oCompany = New SAPbobsCOM.Company
oCompany.Server = Trim(txtservername.Text.ToString())
oCompany.CompanyDB = Trim(txtcmpdb.Text.ToString())
oCompany.UserName = txtcmpusrname.Text.ToString()
oCompany.Password = txtcmppassword.Text.ToString()
oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English
oCompany.DbUserName = txtdbusrname.Text.ToString()
oCompany.DbPassword = txtdbpassword.Text.ToString()
Try
oCompany.Connect()
oCompany.GetLastError(lErrcode, sErrmsg)
If lErrcode <> 0 Then
MsgBox(sErrmsg)
Else
MsgBox("Connection Esstablished", MsgBoxStyle.Information)
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
For eg:
i connected the SBODemo_India Database thru this code.. i created few tables and fields and i deleted the same and recreated tables for few times.. After some time the same Database thrown an above error
What can i do on this ?
Some body can help me on this to solve
Regards
SureshDear Suresh,
to connect DB , try single sigh on method.
Single Sign-On Process---
1.) The DI API Company object creates a cookie for the current DI API session. This cookie is available for the UI API using the GetContextCookie method.
2.) The UI API Company object uses this cookie as an encryption key to encrypt the connection informationuser code and password. The encrypted connection information is session dependent, and therefore cannot be reused for other sessions.
Method: GetConnectionContext(Cookie).
3.) The DI API Company object deciphers the encrypted connection informationbased on the cookie created in step 1, and then sets the connection information (variable: conStr) for logging to the Company database.
Method: SetSboLoginContext(conStr).
4.) The DI API Company object connects to the company database.
There is no need to set the AddonIdentifier property twice. Instead, you can set the identifier string before calling the Connect method of the UI API.
The following code shows you how to utilize the Single Sign-On:
Dim link As New SAPbouiCOM.SboGuiApi
Dim pCmp As New SAPbobsCOM.Company
Dim Cookie As String
Dim conStr As String
Dim ret As Long
'// Connect the UI API to the running SAP Business One application
link.Connect "***Put Connection String***"
Set app = link.GetApplication
'// Acquire the connection context cookie from the DI API
Cookie = pCmp.GetContextCookie
'// Retrieve the connection context string from the UI API using the 'acquired cookie
conStr = app.Company.GetConnectionContext(Cookie)
'// before setting the SBO Login Context make sure the company ' is not connected
If pCmp.Connected = True Then
pCmp.Disconnect
End If
'// Set the connection context information to the DI API
ret = pCmp.SetSboLoginContext(conStr)
if not ret = 0 then
exit sub '// the operation has failed
end if
'// Establish the connection to the company database
ret = pCmp.Connect() -
Executable crashes on oCompany.Connect
Hi experts,
My DI add-on crashes on oCompany.Connect(), if I execute it using the "shell" command of vb.net, from another application I have create.
The error that occurs is that "the system tried to read in a secure disk."
Any ideas?
Thank you in advance,
Aris PantelatosHi Aris,
Can you explain us what do you mean run your add-on by Shell command of vb.net in more detail? Is your add-on a stand-alone app or it is executed by another win app? Why you need to do this?
Lan -
Data Federator data source not available causes Universe Connection error
I created a Data Federator project that connects to 20 servers across US and Canada. All data sources are SQL Server 2005. The DF project maps 40 source objects into 4 target objects. I created a universe based on the DF project and we have been quite pleased with Webi query response. Today one of the source servers was taken off line and this generated a connection error when trying to access the universe (not trying to access the data source that failed). We do not want the universe connection to error when one source server is not available u2013 is that possible?
If the answer is no then I see us abandoning what appears to be a great solution for real time distributed reporting and resorting to ETL and moving data.Hi Chapman,
Can you be little elobrate on what you have done to solve the issue.
Thanks,
Dayanand -
RFC connection Error in SLDCheck
Hi All,
I am trying to logon to Integration builder for that i getting the ESR builder address is not maintain. for this i have chk in SLDCheck t code ,there i am getting LCRSAPRFC connection error.I have test the RFC connection in that i am getting the
the error in register server program
Error Details ERROR: program LCRSAPRFC_XID not registered
now wht i have to do for troubleshooting
RegardsThanx for reply
when I test connection to Connection Test SLD_UC error
Logon Connection Error
Error Details Error when opening an RFC connection
Error Details ERROR: program SLD_UC not registered
Error Details LOCATION: SAP-Gateway on host sapdevpi / sapgw00
Error Details DETAIL: TP SLD_UC not registered
Error Details COMPONENT: SAP-Gateway
Error Details COUNTER: 62
Error Details MODULE: gwr3cpic.c
Error Details LINE: 1778
Error Details RETURN CODE: 679
Error Details SUBRC: 0
Error Details RELEASE: 701
Error Details TIME: Fri Jan 8 11:05:42 2010
Error Details VERSION: 2
RFC SLD_UC is connection T
Gateway Host sapdevpi
Gateway server sapgw00
same error with
Connection Test SLD_NUC
Connection Test SAPSLDAPI ( program Id SAPSLDAPI_DPI )
Connection Test SAPJ2EE
In Connection Test LCRSAPRFC error program id LCRSAPRFC_DPI
Logon Cancel
Error Details max no of 100 conversations exceeded / CPIC-CALL: 'ThSAPCMRCV' : cmRc=17 thRc=45
Error Details ERROR: max no of 100 conversations exceeded
Error Details LOCATION: CPIC (TCP/IP) on host sapdevpi
Error Details COMPONENT: CPIC (TCP/IP) with Unicode
Error Details COUNTER: 82
Error Details MODULE: r3cpic_mt.c
Error Details LINE: 10791
Error Details RETURN CODE: 466
Error Details SUBRC: 0
Error Details RELEASE: 701
Error Details TIME: Fri Jan 8 11:12:56 2010
Error Details VERSION: 3
Regards
shahid -
RFC connection error between Netweaver 7 EHP1 and Ides ECC6
Hi Friends,
I try to create source system in BI from Netwever EHP1 to IDES ECC6 EHP3.
During the creation I get a connection error, says. check connction parameter.
I checked the parameter, everything is fine. Server, System and number.
When I went to the SM59 and created a connction.
I.E. with the same parameter like system = 06 and server = compi9 gave client 800 etc.
The Host name is resolved to 192.168.2.111 wich is OK.
But when I run the connection test it shows me "ERROR: partner '80.156.86.78:sapgw06' not reached"
I have no idea where this IP '80.156.86.78" is comming from.
No Problem with the opposite way, from Ides to NW and login to the System is OK too.
Can anybody help me with this problem.
RG. JimbobHi,
What is the next screen that comes up when you click on remote logon.
If no screen comes up then:
Check the user type of the user id used for this RFC.
It should be either dialog or service user for able to remote login.
If it open a new window and asks for password, then its excatly password issue.
Also make sure that the password is in numeric and correct.
Also make sure that the current user check box is unchecked.
Even if it dosent work, delete the connection and create again.
Please award points if helps.
Thanks
Santhosh -
Dear All,
when i connect our BI System to R/3 system via RFC in SM59 ,i am getting following error in BI system and also The problem occur in particular instance .(Other instance working fine in BI system)
Logon Connection Error
Error Details Error when opening an RFC connection
Error Details ERROR: timeout during allocate
Error Details LOCATION: SAP-Gateway on host chwslp05 / sapgw01
Error Details DETAIL: no connect of TP sapdp15 from host sapp3b.eame.syngenta.org after 20 s
Error Details COMPONENT: SAP-Gateway
Error Details COUNTER: 162003
Error Details MODULE: gwr3cpic.c
Error Details LINE: 1973
Error Details RETURN CODE: 242
Error Details SUBRC: 0
Error Details RELEASE: 700
Error Details TIME: Mon Apr 27 14:29:33 2009
Error Details VERSION: 2
Any one please suggest.
Thanks,
Thirumoorthy.mostly your gateway servicve is not working check smgw tcode on that instance
you can do this goto sm59->select the instace execute tcode smgw
easy way is restart the instance
it will start working
Samrat -
RFC Connection error in SM59 for SAP J2EE
Hi All,
i am getting the following error description while testing the connection for
SAP J2EE ...
Connection Test SAPJ2EE
Connection Type TCP/IP Connection
Logon Connection Error
Error Details Error when opening an RFC connection
Error Details ERROR: program sapfallback not registered
Error Details LOCATION: SAP-Gateway on host filip / sapgw00
Error Details DETAIL: TP sapfallback not registered
Error Details COMPONENT: SAP-Gateway
Error Details COUNTER: 1483
Error Details MODULE: gwr3cpic.c
Error Details LINE: 1694
Error Details RETURN CODE: 679
Error Details SUBRC: 0
Error Details RELEASE: 700
Error Details TIME: Tue Mar 31 02:44:35 2009
Error Details VERSION: 2
Help me resolve this
Regards,
Mahesh.Hi,
Please follow this steps:
Creating RFC Destinations in the ABAP and Java Environment
You need to create the following RFC destinations in transaction SM59 (ABAP) and the Visual Administrator (Java):
u2022 AI_RUNTIME_JCOSERVER
u2022 AI_DIRECTORY_JCOSERVER
u2022 LCRSAPRFC
u2022 SAPSLDAPI
Depending on your client settings, it may be necessary to be logged on your SAP Exchange Infrastructure host as SAP system user with the authorization to maintain customizing tables and to release transport orders. Note, that user "SAP*" or "DDIC" does not have these authorizations.
Maintaining the RFC Connections (Transaction SM59)
1. Log on to your SAP Exchange Infrastructure central instance host.
2. Call transaction SM59.
3. Choose Create.
4. Enter at least the following:
RFC destination: AI_RUNTIME_JCOSERVER
Connection type: T
Description: <your description>
5. Choose ENTER
6. Choose the tab Technical settings and do the following:
a. Select Registered Server Program
b. In the Program ID field, enter: AI_RUNTIME_<SID> where <SID> is the SAP system ID of your Integration Server host. Use uppercase letters only.
c. Enter Gateway host and Gateway service of your Integration Server host. To find out the required parameters:
a. On the Integration Server host, call transaction SMGW
b. Choose Goto u2192 Parameters u2192 Display (see entries for gateway hostname and gateway service)
7. Choose tab Special Options and select the flag Unicode in the box Character Width in Target System.
8. Save your settings.
9. Repeat the steps 3 u2013 8 for the remaining destinations:
Destination
Values
AI_DIRECTORY_JCOSERVER
Program ID: AI_DIRECTORY_<SID>, where <SID> is the SAP system ID of your SAP XI host
LCRSAPRFC
Program ID: LCRSAPRFC_<SID>, where <SID> is the SAP system ID of your SAP XI host.
SAPSLDAPI
Program ID: SAPSLDAPI_<SID>, where <SID> is the SAP system ID of your SAP XI host.
10. Leave the transaction SM59 open for later tests.
J2EE Configuration for the Destinations (Visual Administrator)
1. On your SAP Exchange Infrastructure central instance host, start the J2EE Engine administration tool.
2. Choose Cluster u2192 Server u2192 Services u2192 JCo RFC Provider
3. In the section RFC destination, enter exactly the same program ID and gateway options for AI_RUNTIME_JCOSERVER that you used in the step Maintaining the RFC connection above. Additionally, set the number of processes to 10.
4. In the section Repository, do the following:
a. Enter the parameter for the SAP XI host: Application Server, System Number, Client and Language.
b. For User and Password maintain the login parameters for the user SAPJSF.
c. Select the flag Unicode.
6. Choose Set.
7. Repeat the steps 3 u2013 6 for the remaining destinations:
Destination
Values
AI_DIRECTORY_JCOSERVER
u2022 Corresponding values from SM59
u2022 Number of processes: 10
LCRSAPRFC
u2022 Corresponding values from SM59
u2022 Number of processes: 3
SAPSLDAPI
u2022 Corresponding values from SM59
u2022 Number of processes: 3
Testing the RFC Destination
After you have maintained all RFC destinations in both the ABAP and Java environment, you can check all the connections above as follows:
1. Call transaction SM59 again.
2. Open your RFC destination.
3. Choose Test Connection. No error should be displayed.
This will solve your problem.
Thanks
Laxmi Bhushan -
RFC connection error (VPN-access)
Hi!
I have the following error for the RFC connection:
The RFC connection is setup as follows.
/H/10.101.7.1/S/3299/H/10.151.6.194
10.101.7.1 = IP of our SAP Router
10.151.6.194 = IP of customer system
The RFC connection is established:
SAP Router (intern) --> Target systems
The error is:
Logon Connection Error
Error Details Error when opening an RFC connection
Error Details ERROR: partner not reached (host 10.151.6.194, service sapgw20)
Error Details LOCATION: SAP-Gateway on host bksapp01 / sapgw20
Error Details DETAIL: NiPConnect2
Error Details CALL: SiPeekPendConn
Error Details COMPONENT: NI (network interface)
Error Details COUNTER: 592
Error Details ERROR NUMBER: 10060
Error Details ERROR TEXT: WSAETIMEDOUT: Connection timed out
Error Details MODULE: nixxi.cpp
Error Details LINE: 8777
Error Details RETURN CODE: -10
Error Details SUBRC: 0
Error Details RELEASE: 640
Error Details TIME: Thu Jun 19 10:42:42 2008
Error Details VERSION: 37
Can some one help to solve the problem?
Thank you very much
ThomHi
Change the saprouter string to
/H/10.101.7.1/S/3299/H/10.151.6.194/S/32<system number>
and try !!! -
RFC connection error when registering PROGRAM ID.
Hi,
I created a RFC connection of type T.
I gave the following parameters ->
gateway host: hostname and then ip-address
gateway service: sapgwxx
Registered program id: xxx
It is giving me the following error:
Error Details Error when opening an RFC connection
Error Details ERROR: program sapgwxx not registered
Error Details LOCATION: SAP-Gateway on host <hostname> / sapgwxx
Error Details DETAIL: TP sapgwxx not registered
Error Details COMPONENT: SAP-Gateway
Error Details COUNTER: 2696
Error Details MODULE: gwr3cpic.c
Error Details LINE: 1777
Error Details RETURN CODE: 679
Error Details SUBRC: 0
Error Details RELEASE: 700
Can anyone help me in troubleshooting the issue.
Also I am not able to register this program id in Visual Admin -> Services -> JCo RFC Provider. Here it is giving me an error. Can anyone guide me in this?
Points to be rewarded for any kind of small help.Thanks Ramesh.
I followed the blog. Here are the steps that I did.
RFC destination:
1. To create the RFC go to TCODE: SM59 <b>-> Done</b>2. Create new destination of type T (TCP/IP) <b>-> Done</b>
3. Make sure you select Registered Server Program option before writing your program ID <b>-> Done</b>
4. Write you program ID (remember it's case-sensitive) <b>-> gave the SID name</b>
5. In the gateway host and gateway service write the values of your "Application system" - business system (not the XI server) <b>-> Typed the gateway hostname and gateway service "sapgw<instance no>", that I got from SMGW.</b>
But still I face the same problem. It get the following error:
Logon Connection Error
Error Details Error when opening an RFC connection
Error Details ERROR: program <SID name> not registered
Error Details LOCATION: SAP-Gateway on host xxxxx / sapgwxx
Error Details DETAIL: TP <SID Name> not registered
Error Details COMPONENT: SAP-Gateway
Error Details COUNTER: 2719
Error Details MODULE: gwr3cpic.c
Error Details LINE: 1777
Error Details RETURN CODE: 679
Error Details SUBRC: 0
Error Details RELEASE: 700
Error Details TIME: Thu Nov 1 10:39:43 2007
Error Details VERSION: 2
Kindly help me out. -
RFC Connection Error during Web AS ABAP Database Instance
I keep getting RFC Connection error installing the database instance. The following are the pertinent logs:
INFO 2007-05-09 20:10:04
Working directory changed to C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\MSS\UC\DB.
INFO 2007-05-09 20:10:04
Output of C:\usr\sap\X22\SYS\exe\run\r3trans.exe -u 1 -i "C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\MSS\UC\DB\mssprocs640.dat" is written to the logfile r3trans.exe.log.
INFO 2007-05-09 20:10:22
Execution of the command "C:\usr\sap\X22\SYS\exe\run\r3trans.exe -u 1 -i "C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\MSS\UC\DB\mssprocs640.dat"" finished with return code 0. Output: This is C:\usr\sap\X22\SYS\exe\run\r3trans.exe version 6.13 (release 640 - 03.06.05 - 17:04:00).unicode enabled versionC:\usr\sap\X22\SYS\exe\run\r3trans.exe finished (0000).
INFO 2007-05-09 20:12:23
RFC parameter CLIENT set to value 000.
INFO 2007-05-09 20:12:23
RFC parameter USER set to value DDIC.
INFO 2007-05-09 20:12:23
RFC parameter LCHECK set to value 1.
INFO 2007-05-09 20:12:23
RFC parameter PCS set to value 1.
INFO 2007-05-09 20:12:23
RFC parameter LANG set to value EN.
INFO 2007-05-09 20:12:23
RFC parameter ASHOST set to value cix22.
INFO 2007-05-09 20:12:23
RFC parameter SYSNR set to value 00.
INFO 2007-05-09 20:12:23
RFC connection information checked successfully.
ERROR 2007-05-09 20:12:24
FRF-00007 Unable to open RFC connection.
I tried the following fixes spread across different threads in this Expert Forums:
1. Someone said network problem. I rebooted, restarted the install and even redo it.
2. Another suggestion was to use caps on the password. Didnt work.
3. One suggestion was to update the keydb.xml file. However, I could find such property name:
search for the table t_SAPComponent_SAPSystemLogon_SHARED
then look for <fld name="pPW">, <properties>,
<property name ="GUIENG_USER_INPUT" and set the value
"GUINEG_TRUE" to "GUIENG_FALSE".
4. I even used the ddic password 19920706 which is supposed to be the default.
5. Restarted the instance and applied all the fixes above.
Does anyone know what is going on base on the logs above? Thanks.try moving all your install disk onto local file system then rerun the install. That might work....
-
I haven't been able to connect to itunes for 3 days. It says theres a connection error, yet I am connected to the internet. I have redownloaded itunes and still get this message.
Close your iTunes,
Go to command Prompt -
(Win 7/Vista) - START/ALL PROGRAMS/ACCESSORIES, right mouse click "Command Prompt", choose "Run as Administrator".
(Win XP SP2 n above) - START/ALL PROGRAMS/ACCESSORIES/Command Prompt
In the "Command Prompt" screen, type in
netsh winsock reset
Hit "ENTER" key
Restart your computer.
If you do get a prompt after restart windows to remap LSP, just click NO.
Now launch your iTunes and see if it is working now.
If you are still having these type of problems after trying the winsock reset, refer to this article to identify which software in your system is inserting LSP:
iTunes 10.5 for Windows: May see performance issues and blank iTunes Store
http://support.apple.com/kb/TS4123?viewlocale=en_US -
Problem with scanning - printer display shows "Server connection error"
My printer has been working great and I have had no problems with scanning. But two days ago, all of a succen I rec'd message "server connection error". I tried to send to email as well as computer. Got the same message. As usual, I don't recall any action on my part that could have caused this problem. The copying and printing functions work fine. Detailed advice to someone technically challenged will be much appreciated. Thank you.
Ran
into a problem with connecting to the DB on the SQL server from the IPAM server. The Dba and I checked the target SQL instance was enabled TCP and listening on a valid TCP port. SQL server was set to use port 1443 for incoming connections.
IPAM was set by default to use 1433.
Also used
netstat-n to identify issue and verified 1443 on SQL server was
being used. Made the correction under the IPAM provisioning wizard and connected to the database. Fixed.
Important note I was able to connect to the database with a .udlfile
without any issues
Also note that 2012 R2 IPAM only supports 2012 SQL Enterprise. Why?
Maybe you are looking for
-
Exporting files from InDesign to correct size
Hi, Hope someone can help. I create multiple ads for many publications and have joboptions set up for each. Brill, saves loads of time! However, some require the ad to be cropped to bleed size but still include crop marks. How can I export a PDF to t
-
Insert XML data into oracle table
I want to insert xml data returned by the VB code into oracle table. As a prequisite I have installed the XDK capabilities for Oracle by installing JServer & running SQL scripts catxsu.sql,xmlparserv2.jar,load.sql to load the XMLSQL Utility (DBMS_XML
-
User error when connecting to Apex on XE with Oracle drive
Hi, When I tried to connect to Apex (webdav) on an XE database to access themes and css with Oracle Drive it sends incorrect user or password message, I tried with sys, system and other users. With windows explorer I could connect using the same user
-
Shooting mouse cursor beyond intended straight line between two points.
I copied this forum question from Lightroom, and I hope this is ok because I did not know how to express the problem I am experiencing: "The photoshop brush tool interprets shift-click as a brush stroke that connects the previous brush mouse-up posit
-
[iphone] Handling button touch events
I have a view controller which contains a view which in turn manages 2 subviews that take up the entire scree, think like a playing card, where the 2 subviews simulate the front and back of the same card. When the user taps anywhere on the card, the