473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Accessing SQL Server Stored Procedure from VB.NET

Hi,

I have a SQL Stored Procedure :

CREATE PROCEDURE spFilterOne
@city varchar(25)
AS
SELECT * FROM tblCities
WHERE tblCities.strCity = @city
ORDER BY tblCities.strName
In VB.NET, I would like to create a hashtable and add a key, which will be
sent to the stored procedure, as parameter @city

Dim hsParams As Hashtable
hsParams.Add("@param1", "London")
My Question :

How can I execute this stored procedure, with the hashtable giving the
parameter, from VB.NET? Once execute, I can put the rows into a dataset, that
works fine.. but its just executing the stored procedure. Thanks!!
Jul 21 '05 #1
1 1715
crisp - you can just create a command object and populate its Paramaters
collection - it gets you to the same place.

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"crisp99" <cr*****@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
Hi,

I have a SQL Stored Procedure :

CREATE PROCEDURE spFilterOne
@city varchar(25)
AS
SELECT * FROM tblCities
WHERE tblCities.strCity = @city
ORDER BY tblCities.strName
In VB.NET, I would like to create a hashtable and add a key, which will be
sent to the stored procedure, as parameter @city

Dim hsParams As Hashtable
hsParams.Add("@param1", "London")
My Question :

How can I execute this stored procedure, with the hashtable giving the
parameter, from VB.NET? Once execute, I can put the rows into a dataset, that works fine.. but its just executing the stored procedure. Thanks!!

Jul 21 '05 #2

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

Similar topics

4
by: mingzhen | last post by:
Hi, I have a problem here when I code stored procedure to manipulate data in database. My idea is that if I can save all data I get in some arrays I should be able to manipulate the arrays...
3
by: Michael | last post by:
This one's really got me. I have a VB.NET (version 1.1.4322) project that provides an easy way to execute stored procedures on a generic level. When I run the code on computer A (running SQL...
1
by: David C. Allen | last post by:
I am trying to debug an SQL Server Stored Procedure form VS.NET 2003. I have a break point set in the SP code but it is not being hit. When I hold the pointer over the line it says that it will not...
3
by: Niyazi | last post by:
Hi, Me again. I want to create a SQL Server StoreProcedure and I want to access it with ADO.NET. I am using VB.NET. Creating StoreProcedure it was easy but my question is this. I have table...
6
by: fumanchu | last post by:
I've got to let end users (really just one person) load billing batch files into a third party app table. They need to specify the billing cycle name, the batch name, and the input file name and...
2
by: honcho | last post by:
Hello, Does anyone have an example of an SQL Server stored procedure that updates a record, where one of its field is of type "text"? My procedure is /* ** Update the client note and...
1
by: crisp99 | last post by:
Hi, I have a SQL Stored Procedure : CREATE PROCEDURE spFilterOne @city varchar(25) AS SELECT * FROM tblCities WHERE tblCities.strCity = @city ORDER BY tblCities.strName
4
by: Mr Not So Know It All | last post by:
im new to SQL Server and ASP.Net. Here's my problem. I have this SQL Server stored procedure with an input parameter and output parameter CREATE PROCEDURE . @in_rc varchar(8) @out_eList...
1
by: seyyadri | last post by:
Hi, I want the data in excel, pulled from SQL server stored procedure. The SQL SP has the parameters. when we open/refresh the excel it should prompt the user to enter the parameters (dynamically),...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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,...

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.