|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
dll & Web Service in VB.Net 2005 Stored ProcedureI am writing a vb.net2005 program that needs to create a stored procedure with SqlServerProject Template. Now, I have two questions for this stored procedure. 1) How can I import and execute the .dll in this Stored Procedures? 2) How can I connect the Web Service and get the result in this Stored Procedures? ------------------------------------------------------------------- Partial Public Class StoredProcedures1 <Microsoft.SqlServer.Server.SqlProcedure()> _ Public Shared Sub GetTable() Dim strSQL As String = "SELECT * FROM Table1" Using conn As New SqlConnection("context connection=true") Using cmd As New SqlCommand With cmd .Connection = conn .CommandText = strSQL .CommandType = CommandType.Text conn.Open() SqlContext.Pipe.ExecuteAndSend(cmd) .Connection.Close() End With End Using End Using End Sub End Class ------------------------------------------------------------------- Thanks! James,
It can be that I understand you wrong, however a stored procedure can contain SQL transact language. Not VBNet DLL's. Cor Show quoteHide quote "James Wong" <cphk_msdn@nospam.nospam> schreef in bericht news:%23gd%23I%234iGHA.1204@TK2MSFTNGP02.phx.gbl... > Hi, > > I am writing a vb.net2005 program that needs to create a stored procedure > with SqlServerProject Template. > Now, I have two questions for this stored procedure. > > 1) How can I import and execute the .dll in this Stored Procedures? > 2) How can I connect the Web Service and get the result in this Stored > Procedures? > > ------------------------------------------------------------------- > Partial Public Class StoredProcedures1 > <Microsoft.SqlServer.Server.SqlProcedure()> _ > Public Shared Sub GetTable() > > Dim strSQL As String = "SELECT * FROM Table1" > > Using conn As New SqlConnection("context connection=true") > Using cmd As New SqlCommand > With cmd > .Connection = conn > .CommandText = strSQL > .CommandType = CommandType.Text > conn.Open() > SqlContext.Pipe.ExecuteAndSend(cmd) > .Connection.Close() > End With > End Using > End Using > End Sub > End Class > ------------------------------------------------------------------- > > Thanks! > Thanks!
Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> ¼¶¼g©ó¶l¥ó·s»D:O4ff2y5iGHA.4***@TK2MSFTNGP05.phx.gbl... > James, > > It can be that I understand you wrong, however a stored procedure can > contain SQL transact language. Not VBNet DLL's. > > Cor > > "James Wong" <cphk_msdn@nospam.nospam> schreef in bericht > news:%23gd%23I%234iGHA.1204@TK2MSFTNGP02.phx.gbl... >> Hi, >> >> I am writing a vb.net2005 program that needs to create a stored procedure >> with SqlServerProject Template. >> Now, I have two questions for this stored procedure. >> >> 1) How can I import and execute the .dll in this Stored Procedures? >> 2) How can I connect the Web Service and get the result in this Stored >> Procedures? >> >> ------------------------------------------------------------------- >> Partial Public Class StoredProcedures1 >> <Microsoft.SqlServer.Server.SqlProcedure()> _ >> Public Shared Sub GetTable() >> >> Dim strSQL As String = "SELECT * FROM Table1" >> >> Using conn As New SqlConnection("context connection=true") >> Using cmd As New SqlCommand >> With cmd >> .Connection = conn >> .CommandText = strSQL >> .CommandType = CommandType.Text >> conn.Open() >> SqlContext.Pipe.ExecuteAndSend(cmd) >> .Connection.Close() >> End With >> End Using >> End Using >> End Sub >> End Class >> ------------------------------------------------------------------- >> >> Thanks! >> > > Hello James,
As for this issue, I've found your another dupilcated thread in the microsoft.public.dotnet.general newsgroup. I've posted my response and some suggestion there. I'd appreciate if you have a look there. Also, if there is anything unclear or if you need any further assistance, please feel free to post there. Thanks for your understanding. Regards, Steven Cheng Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
Threading Advice
Changing text in Report viewer SQL Express or MDB - opinions please stupid questions re: DatagridView ExecuteNonQuery Wierdness Evaluating threads in an application Reading - Parsing Records From An LDAP LDIF File In .Net? Visual Studio 2005 - Code Snippet Manager missing Data Reader Cloning a RichTextBox |
|||||||||||||||||||||||