473,714 Members | 2,500 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dll & Web Service in VB.Net 2005 Stored Procedure

Hi,

I am writing a vb.net2005 program that needs to create a stored procedure
with SqlServerProjec t 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 StoredProcedure s1
<Microsoft.SqlS erver.Server.Sq lProcedure()> _
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.Tex t
conn.Open()
SqlContext.Pipe .ExecuteAndSend (cmd)
.Connection.Clo se()
End With
End Using
End Using
End Sub
End Class
-------------------------------------------------------------------

Thanks!
Jun 9 '06 #1
3 1557
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" <cp*******@nosp am.nospam> schreef in bericht
news:%2******** ************@TK 2MSFTNGP02.phx. gbl...
Hi,

I am writing a vb.net2005 program that needs to create a stored procedure
with SqlServerProjec t 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 StoredProcedure s1
<Microsoft.SqlS erver.Server.Sq lProcedure()> _
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.Tex t
conn.Open()
SqlContext.Pipe .ExecuteAndSend (cmd)
.Connection.Clo se()
End With
End Using
End Using
End Sub
End Class
-------------------------------------------------------------------

Thanks!

Jun 9 '06 #2
Thanks!

"Cor Ligthert [MVP]" <no************ @planet.nl> ¼¶¼g©ó¶l¥ó·s»D: O4************* *@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" <cp*******@nosp am.nospam> schreef in bericht
news:%2******** ************@TK 2MSFTNGP02.phx. gbl...
Hi,

I am writing a vb.net2005 program that needs to create a stored procedure
with SqlServerProjec t 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 StoredProcedure s1
<Microsoft.SqlS erver.Server.Sq lProcedure()> _
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.Tex t
conn.Open()
SqlContext.Pipe .ExecuteAndSend (cmd)
.Connection.Clo se()
End With
End Using
End Using
End Sub
End Class
-------------------------------------------------------------------

Thanks!


Jun 9 '06 #3
Hello James,

As for this issue, I've found your another dupilcated thread in the

microsoft.publi c.dotnet.genera l

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.)

Jun 9 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2869
by: antonovaCCCS | last post by:
In our old VB 6 application we utilize a mail merge feature of Word 97 with MS Access. A table in Access is populated from VB and a Word template is wired to that table. So all we do in the code is call the merge method of Word. Problem: We are moving to VB.NET (VS 2005) and Office 2003. I want to bypass Access and either use a connection to SQL or a parametrized stored procedure. I found some samples, but was not able to open the...
2
2457
by: Trevor | last post by:
Argh! This problem is driving me nuts! Can you help? In November of 2003, I installed a web service on Windows Server 2003 built in VB.NET for v1.1.4322 of the framework. It contains a timer (System.Timers.Timer) which has an interval of 24 hours. Actually, it reads a time like 2AM out of the config file, and calculates the time between the start of the service to 2AM, and sets the timer. When the timer expires, it re-reads the...
5
2156
by: James Wong | last post by:
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?
1
2582
by: den 2005 | last post by:
Hi everybody, I created several stored procedure in a local sql server 2005 express database, now when I call/execute them in the asp.net 2.0 web page, it returns an error message of "Cannot find the stored procedure '<proc_name>'", this is funny, when I execute the command in a sql query window "exec sp_GetAllArticles", it also returns cannot find stored procedure, but when I execute the "Use <DBName>" and then execute the statement, it...
6
6394
by: rn5a | last post by:
Suppose a SQL Server 2005 stored procedure looks like this: ALTER PROCEDURE SPName @UserID int SELECT COUNT(*) FROM Table1 WHERE UserID = @UserID SELECT COUNT(*) FROM Table1 In the ASPX page, I can get the result of the first query in the above SP using
4
4360
by: scparker | last post by:
Hello, We have a stored procedure that does a basic insert of values. I am then able to retrieve the ID number created for this new record. We are currently using ASP.NET 2.0 and use N-Tier Architecture. The Stored Procedures are used through TableAdaptors, which in turn are used by Class Files. I wish to be able to return this new ID value using the Stored
0
1140
by: sheenaa | last post by:
Hi Everyone, I m using ASP.NET 2005 with C# and SQL SERVER 2005. I m using stored procedure and sql datasource control to retrieve the data. I want to use the trigger alongwith storedprocedure. I have created the following trigger on emp_table.
0
1181
by: barmatt80 | last post by:
I have been trying to create a web service that calls a stored procedure that will accept one value call the sql stored procedure that returns 4 variables. I haven't done this ever before, and haven't found how to do it yet. It is a ms sql 2005 stored procedure. I was told I could not use http endpoints on the sql server. Any guidance or help with this? Thanks.
12
30939
by: barmatt80 | last post by:
I don't know if this is the right part of the forum. But.... I have been working all night trying to create a web service to call a stored procedure in sql server 2008. The stored procedure calls a linked server to a db2 database that accepts 1 integer and returns 6 variables. The end result would be publish the web service to our sharepoint servers. This is not a problem. I am just trying to wrap my head around it. I know how to call...
3
5047
by: cmrhema | last post by:
Hi, Kindly excuse if I am posting in the wrong place. I am using Visual Studio 2008, .net framework 3.5, asp.net , c# and sql server 2005. I am supposed to pass stored procedures from client to wcf service. The WCF service should execute the stored procedure and return the result.
0
8707
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9174
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7953
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5947
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4464
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4725
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2110
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.