Use the eConnect_EntryPoint method to submit an
eConnect document.
Name
|
Data type
|
Description
|
connectionString
|
string
|
Specifies your data server and database.
|
connectionType
|
Microsoft.Dynamics.GP.
eConnect.EnumTypes.
ConnectionStringType
|
Use the ConnectionStringType enumeration
member that specifies the type of your data server.
ConnectionStringType includes the following members:
SqlClient
OleDB
|
sXML
|
string
|
An eConnect XML document.
|
validationType
|
Microsoft.Dynamics.GP.
eConnect.EnumTypes.
SchemaValidationType
|
Use a SchemaValidationType enumeration member
to specify the type of data validation to perform.
SchemaValidationType includes the following members:
None
XSD
|
eConnectSchema
|
string
|
Optional.
If you set the ValidationType parameter to
XSD, you must specify the filepath to the .xsd file that contains
the schema definition.
If you set the ValidationType parameter to
None, the parameter defaults to an empty string and you do not need
to supply a value.
|
Return Value
Type: boolean
The method returns a boolean value that indicates
whether the XML document was successfully submitted. A return value
of True indicates the operation was successfully completed.
Remarks
This method is obsolete. To replace existing
calls to eConnect_EntryPoint, use the CreateEntity,
CreateTransactionEntity, DeleteEntity, DeleteTransactionEntity,
UpdateEntity or UpdateTransactionEntity method.
To submit a document, create a string that
represents the eConnect XML document. Use the string as the sXML
parameter.
If an error occurs, the method throws an
eConnectException, application exception, or exception.
Examples
The following Visual Basic .NET example uses the
eConnect_EntryPointmethod to submit an eConnect XML
document. Notice that the ConnectionType parameter uses the
EnumTypes.ConnectionStringType.SqlClient enumeration to specify a
SQL client connection. The ValidationType parameter uses the
EnumTypes.SchemaValidationType.None enumeration to specify that the
XML document is not validated. If you set the ValidationType
parameter to None, the eConnect_EntryPoint method does not require
the eConnectSchema parameter. The parameter defaults to an empty
string.
Dim ConnectionString As String
Dim eConnectResult As Boolean
Dim eConnectObject As New eConnectMethods
Dim xmlDoc As XmlDocument
'Set the connection string
'This connection string uses integrated security to connect to the
'TWO database on the local computer
ConnectionString = "Data Source=localhost;Integrated
Security=SSPI;" _
& "Persist Security Info=False;Initial Catalog=TWO;"
'Load the contents of the textbox into the xmlDoc object
xmlDoc.LoadXml(XmlDoc_TextBox.Text)
'Instantiate an eConnectMethods object
Dim eConnectObject As New eConnectMethods
'If eConnectResult is TRUE, the XML document was successfully
submitted
eConnectResult =
eConnectObject.eConnect_EntryPoint(ConnectionString, _
EnumTypes.ConnectionStringType.SqlClient, _
xmlDoc.OuterXml, _
EnumTypes.SchemaValidationType.None)
See Also