473,513 Members | 2,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to View Results from a Stored Procedure in a Listbox

36 New Member
Hi I'm Tried Lot's of forums but still no Answer
Can you guys help me?

What i have is a Stored procedure looks like this

ALTER PROCEDURE dbo.DriveSearch

@Driver varchar(50)
AS
SELECT Name,Furi
FROM Driver
WHERE Furi Like @Driver + '%'


And in the user end

I have a form which includes a textbox, button, and a listbox

all i wanna do is get the results from the stored procedure and show it in the listbox

p/s user inputs the parameter(@driver) using the textbox and the button is for execute the stored procedure.

can anyone help me in this??


P/s Im using sql 2005 express and visual studio 2005 .net

Thank you
Sep 1 '07 #1
4 2189
gayano
36 New Member
Please Anybody help
I'm stuck here
Sep 1 '07 #2
gahoi
5 New Member
Hi I'm Tried Lot's of forums but still no Answer
Can you guys help me?

What i have is a Stored procedure looks like this

ALTER PROCEDURE dbo.DriveSearch

@Driver varchar(50)
AS
SELECT Name,Furi
FROM Driver
WHERE Furi Like @Driver + '%'


And in the user end

I have a form which includes a textbox, button, and a listbox

all i wanna do is get the results from the stored procedure and show it in the listbox

p/s user inputs the parameter(@driver) using the textbox and the button is for execute the stored procedure.

can anyone help me in this??


P/s Im using sql 2005 express and visual studio 2005 .net

Thank you
=======
dear
first think you use the listbox or listview
if you use list box
ans is
select query run in this time and
cmd=new sqlcommand(sqlname, connection name)
cmd.exucatereader
while daread.read then
textbox.text= daread("dataname")
textbox.text=daread("dataname")
listbox.text=daread("dataname")
end while
and you use the list view
then

select query run in this time and
cmd=new sqlcommand(sqlname, connection name)
cmd.exucatereader
while daread.read then
dim lv as string
dim i as interger
dim lv as new listviewitem.count-1
for each i=0 to i=lv.count-1
listview.items(i).subitems(0).add("dataname")



next
endif
Sep 1 '07 #3
gayano
36 New Member
Thnks I try it
Thanks for your help
Sep 3 '07 #4
gayano
36 New Member
sorry gahoi
I dont understand your english
Can you please try to explain it to me again??
Sep 5 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
8057
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure...
4
1903
by: Lauren Quantrell | last post by:
In my old MDB databases, I constructed a lot of "subQueries" to filter out records, then based a new query on the subQuery. This results in huge speed increases on large datasets. However... In...
2
3949
by: Not Me | last post by:
Hey, Coming back to a piece of work I did a while back, which used a stored procedure to populate a list box. The SP takes a single parameter, and I think this is the reasoning for using 'exec'...
2
1522
by: John | last post by:
Hi, First of all sorry for my not perfect english. I've got listbox in my .aspx page where the users can make multiple selection. So, Users can select 7 items in listbox, I have to take value...
2
1831
by: Justin | last post by:
I am creating a web app for a client in VS.NET using ASP.NET with C#. I need to query three tables in a database using one parameter and display the results on the page. my question is should I use...
104
10757
by: Beowulf | last post by:
I have the view below and if I use vwRouteReference as the rowsource for a combo box in an MS Access form or run "SELECT * FROM vwRouteReference" in SQL Query Analyzer, the rows don't come through...
1
3182
by: karups | last post by:
Hi, I've got listbox in my .aspx page where the users can make multiple selection. So, Users can select 7 items in listbox, I have to take value from items and pass it to stored procedure to...
12
4687
by: brwalias | last post by:
Hi, using .net 2 sql server 2005 Here is my situation: I'm passing a variable in the url from a selection on Page A and need to display the results on the Results page be based on that...
2
1369
by: gayano | last post by:
Hi all, I have a stored procedure (and im using .net) ALTER PROCEDURE dbo.DriveSearch @Driver varchar(50) AS SELECT Name,Furi FROM Driver
0
7157
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...
0
7535
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...
1
7098
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
5682
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,...
1
5084
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...
0
4745
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...
0
3232
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...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
455
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...

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.