J
JT
Hi,
I am not sure that this is the right place to post. I
currently have a Windows forms app that uses a command
button to execute a forxml stored procedure and drop the
output to a file. This, in turn, initiates a BizTalk
orchestration schedule. I would like to remove this
command button from the form and run its procedure as a
separate component, to be scheduled by Windows Task
Manager. The code for the routine is below:
Imports System.Xml
Dim cnSA As SqlClient.SqlConnection
Dim sqlCmd As SqlClient.SqlCommand
Public Const strConn As String = "packet
size=4096;integrated security=SSPI;data
source=JTDEVELOPER\SQLSRV;persist security
info=False;initial catalog=SA2002SQL"
Private Sub GetXMLOutput()
cnSA.ConnectionString = strConn
With sqlCmd
.CommandType = CommandType.StoredProcedure
.CommandText
= "procXMLEXPL_Pri_837P_Trans_to_BTS"
.Connection = cnSA
.CommandTimeout = 30
Dim doc As XmlDocument = New XmlDocument
cnSA.Open()
Dim myXmlReader As XmlTextReader
= .ExecuteXmlReader()
myXmlReader.WhitespaceHandling =
WhitespaceHandling.None
doc.Load(myXmlReader)
' close the XmlReader when finished.
myXmlReader.Close()
cnSA.Close()
doc.Save("D:\BTS Test Instances\priclaim
in\ForOutbound837.xml")
End With
End Sub
I guess what I need to do is encapsulate this sub into
something I can then turn into an .exe. Can anyone tell
me how to go about this? Thanks.
JT
I am not sure that this is the right place to post. I
currently have a Windows forms app that uses a command
button to execute a forxml stored procedure and drop the
output to a file. This, in turn, initiates a BizTalk
orchestration schedule. I would like to remove this
command button from the form and run its procedure as a
separate component, to be scheduled by Windows Task
Manager. The code for the routine is below:
Imports System.Xml
Dim cnSA As SqlClient.SqlConnection
Dim sqlCmd As SqlClient.SqlCommand
Public Const strConn As String = "packet
size=4096;integrated security=SSPI;data
source=JTDEVELOPER\SQLSRV;persist security
info=False;initial catalog=SA2002SQL"
Private Sub GetXMLOutput()
cnSA.ConnectionString = strConn
With sqlCmd
.CommandType = CommandType.StoredProcedure
.CommandText
= "procXMLEXPL_Pri_837P_Trans_to_BTS"
.Connection = cnSA
.CommandTimeout = 30
Dim doc As XmlDocument = New XmlDocument
cnSA.Open()
Dim myXmlReader As XmlTextReader
= .ExecuteXmlReader()
myXmlReader.WhitespaceHandling =
WhitespaceHandling.None
doc.Load(myXmlReader)
' close the XmlReader when finished.
myXmlReader.Close()
cnSA.Close()
doc.Save("D:\BTS Test Instances\priclaim
in\ForOutbound837.xml")
End With
End Sub
I guess what I need to do is encapsulate this sub into
something I can then turn into an .exe. Can anyone tell
me how to go about this? Thanks.
JT