cancel
Showing results for 
Search instead for 
Did you mean: 

Integration

Former Member
0 Kudos

Hi to all,

i wrote the code for integrated to SAP B1 .but When i am trying to execute the code it shows a error at the following line code

sConnectionString=Environment.GetCommandLineArgs.GetValue(1)

Error is Index is Outside the Range array.

What is the problem Please help me. I am New to SAP B1.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Plz check the samples provided by SDK they will help u.

they can be found at C:\Program Files\SAP\SAP Business One SDK\Samples

Vasu Natari.

Former Member
0 Kudos

Hi Vasu Natari,

Thanks for giving the information but i didn't able to find the path because in my system i don't have the sample Folder.

Former Member
0 Kudos

Then plz reinstall SDK along with the samples.

Vasu Natari.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

If you use the SDK Samples try to use "DEBUG" mode of Visual Studio.

Command Line argument is the connection string.

In other cases, see suggestion of Vasu Natari.

Regards

Sierdna S.

P.S. Suggestion in any SAP SDK Sample


...
'// BEFORE STARTING:
'// 1. Add reference to the "SAP Business One UI API"
'// 2. Add reference to the "SAP Business One Objects Bridge Version 2005"
'// 3. Insert the development connection string to the "Command Line Argument"
'//-----------------------------------------------------------------
'// 1.
'//    a. Project->References
'//    b. check the "SAP Business One UI API Version 2004" check box
'//    c. check the "SAP Business One DI API Version 2004" check box
'//
'// 2.
'//     a. Project->Properties
'//     b. choose 'Make' tab folder
'//     c. place the following connection string in the 'Command Line Arguments' field
'// 0030002C0030002C00530041005000020044005F00440061007400650076002C0050004C006F006D0056004900490056
'//
'//**************************************************************************************************
...

Former Member
0 Kudos

OR just provide a connection string from that sample to your Project properties -- Debug -- Command line arguments . that should do.

regards,

Binita