T
Terry Aney
I used to have the following code in VB/ADO when using a
FOR XML clause in SQL Server. Is there a .Net/ADO.Net
counterpart?
' Set strm = New ADODB.Stream
' With strm
' .LineSeparator = adCRLF
' .Mode = adModeRead
' .Type = adTypeText
' .Open
' End With
'
' Set cmd = New ADODB.Command
' With cmd
' .CommandType = adCmdText
' .CommandText = sQry
'
' Set cn = GetConnection(,
m_sServerName, "SynergySystem", m_sSQLLogin,
m_sSQLPassword)
' Set .ActiveConnection = cn
' .Properties("Output Stream").Value = strm
' .Properties("Output Encoding").Value = "UTF-
16" ' "Unicode"
' .Properties("XML Root").Value = "JobQueue"
' If ForDisplay Then
' .Properties("XSL").Value = App.Path
& "\SynergyQueue.xsl"
' End If
' Call .Execute(, , adExecuteStream)
' Call CloseConnection(cn)
' End With
FOR XML clause in SQL Server. Is there a .Net/ADO.Net
counterpart?
' Set strm = New ADODB.Stream
' With strm
' .LineSeparator = adCRLF
' .Mode = adModeRead
' .Type = adTypeText
' .Open
' End With
'
' Set cmd = New ADODB.Command
' With cmd
' .CommandType = adCmdText
' .CommandText = sQry
'
' Set cn = GetConnection(,
m_sServerName, "SynergySystem", m_sSQLLogin,
m_sSQLPassword)
' Set .ActiveConnection = cn
' .Properties("Output Stream").Value = strm
' .Properties("Output Encoding").Value = "UTF-
16" ' "Unicode"
' .Properties("XML Root").Value = "JobQueue"
' If ForDisplay Then
' .Properties("XSL").Value = App.Path
& "\SynergyQueue.xsl"
' End If
' Call .Execute(, , adExecuteStream)
' Call CloseConnection(cn)
' End With