i have a table with ntext field and i need to get some fields including the
ntext value to a vb.net application (vs2003)
i have this routine in vb:
Public Function GetMsgs2Email() As DataTable
Dim da As New SqlDataAdapter
Dim result As New DataTable
Try
cmdSelect.CommandText = "SP_name_here"
cmdSelect.CommandType = CommandType.StoredProcedure
da.SelectCommand = cmdSelect
da.Fill(result)
Return result
Catch ex As SqlException
EDTUtils.LogFiles.Log(ex)
Catch ex As Exception
EDTUtils.LogFiles.Log(ex)
End Try
Return Nothing
End Function
How to write the SP that will return as a result set the ntext value with
other fields?
any other techniques will do as well
thanks in advance
raficreate proc dbo.boo as
select ntext_field, someotherfield, anotherone
from dbo.sometable s
where s.somefield=somevalue
"Rafi" <Rafi@.discussions.microsoft.com> wrote in message
news:5BEDBDC2-D19C-4F03-BEFE-391CA4696768@.microsoft.com...
>i have a table with ntext field and i need to get some fields including the
> ntext value to a vb.net application (vs2003)
> i have this routine in vb:
> Public Function GetMsgs2Email() As DataTable
> Dim da As New SqlDataAdapter
> Dim result As New DataTable
> Try
> cmdSelect.CommandText = "SP_name_here"
> cmdSelect.CommandType = CommandType.StoredProcedure
> da.SelectCommand = cmdSelect
> da.Fill(result)
> Return result
> Catch ex As SqlException
> EDTUtils.LogFiles.Log(ex)
> Catch ex As Exception
> EDTUtils.LogFiles.Log(ex)
> End Try
> Return Nothing
> End Function
> How to write the SP that will return as a result set the ntext value with
> other fields?
> any other techniques will do as well
> thanks in advance
> rafi
Wednesday, March 7, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment