cancel
Showing results for 
Search instead for 
Did you mean: 

Commandline argments

Former Member
0 Kudos

Hi

Which argments are need to give in commands line argments?

sConnectionString = Environment.GetCommandLineArgs.GetValue(1)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thippa,

I'm not 100% sure what you are asking here - are you asking what value to put there, how to put it there or what it does?

In the SDK samples, the connection string is set as a command line argument, and this is the string that the UI uses to connect to the running Business One GUI.

In the samples, there are the following instructions:

' 2.
'     a. Project->Properties...
'     b. choose Configuration Properties folder (place the arrow on Debugging) - or go to Start Options on Debugging tab in VS 2005.
'     c. place the following connection string in the 'Command line arguments' field
' 0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056

Hope this answers your question,

Regards,

Niall

SAP Business One Forums

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi...

Try this code

Private Sub StartApplication()

Dim SAPUI As SAPbouiCOM.SboGuiApi

Dim ConStr As String

SAPUI = New SAPbouiCOM.SboGuiApi

ConStr = Environment.GetCommandLineArgs.GetValue(1)

' ConStr = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056"

SAPUI.Connect(ConStr)

'SAPUI.AddonIdentifier = "5645523035446576656C6F706D656E743A453038373933323333343581F0D8D8C45495472FC628EF425AD5AC2AEDC411"

SBO_Application = SAPUI.GetApplication

End Sub

Regards..

Billa 2007

Former Member
0 Kudos

Hi Thippa Reddy Musturu.

For ADD-ONs in:

1) Development Environment

-


To create SAP application for test you can use any of SAP SDK Samples.

Choose one of more in folder SDK_Samples_2005\COM UI\VB.NET\

For example, if you need the form with matrix, choose COM UI\VB.NET\06.MatrixAndDataSources.

In in startup class of these samples you can find the comment BEFORE STARTING provided below:

In debug mode Visual Studio provide ready cmd line argument: you can see it if open

*Project / Property of <Project_Name1> / Configuration Properties / Debug ... Startup Properties: Command Line Arguments .. you find connection string.


'// BEFORE STARTING:
'// 1. Add reference to the "SAP Business One UI API"
'// 2. Insert the development connection string to the "Command line argument"
'//-----------------------------------------------------------------
'// 1.
'//    a. Project->Add Reference...
'//    b. select the "SAP Business One UI API 2005" From the COM folder
'//
'// 2.
'//     a. Project->Properties...
'//     b. choose Configuration Properties folder (place the arrow on Debugging)
'//     c. place the following connection string in the 'Command line arguments' field
'// 0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056
'//
'//**************************************************************************************************

2) Production Environment

-


You need to create your own startup vb code template.

Hope this help you

Regards

Sierdna S.