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 from items and
pass it to stored procedure to delete 7 rolls in my table. Thats simple,
but what if user select 3 or 30 items in listbox? The problem is that I dont
know the number of the parameters, and how to pass them. can I use array
or is there some different solution?
Of course I can take the collection of items and for every item, I can call
stored procedure, but this is no good in performance reason.
Please help me 2 1525
Are you asking how to pass variable number of values to a stored procedure?
If it is the question, merge all values into one string and parse it in the
stored procedure.
Eliyahu
"John" <st********@yah oo.com> wrote in message
news:uD******** ******@tk2msftn gp13.phx.gbl... 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 from items
and pass it to stored procedure to delete 7 rolls in my table. Thats simple, but what if user select 3 or 30 items in listbox? The problem is that I
dont know the number of the parameters, and how to pass them. can I use array or is there some different solution?
Of course I can take the collection of items and for every item, I can
call stored procedure, but this is no good in performance reason. Please help me
Deep Wrote:
Concatenate the values in a string delimited with some other string like "|" e.g.1|2|3. Pass this string to a stored procedure. Use charat function to extract individual numbers and the fire delete statements.
"Eliyahu Goldin" wrote: Are you asking how to pass variable number of values to a stored procedure? If it is the question, merge all values into one string and parse it in the stored procedure.
Eliyahu
"John" <st********@yah oo.com> wrote in message news:uD******** ******@tk2msftn gp13.phx.gbl... 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 from items and pass it to stored procedure to delete 7 rolls in my table. Thats simple, but what if user select 3 or 30 items in listbox? The problem is that I dont know the number of the parameters, and how to pass them. can I use array or is there some different solution?
Of course I can take the collection of items and for every item, I can call stored procedure, but this is no good in performance reason. Please help me
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Chris |
last post by:
Hi,
I have an application written in ASP and I am converting to ASP.NET
in the old ASP page users can add items to a listbox control.
When the user hits the "submit" command button on the form.
It fires a stored procedure in the SQL Server Database.
The listbox items are converted into a comma delimited string and sent to
stored procedure. This SP constructs a temp table variable out of the
|
by: Jeff Thur |
last post by:
I have a listbox with all the US States. I need the user
to select multiple States from that listbox and pass them
on as parameters to a SQL Stored Procedure that will give
them a count of all the records in the Database that
apply to those States. I realize That an array must be
created, but I am not sure how to go about this. Any help
would be greatly appreciated.
Thanks...........
|
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' in the row source (I
assume you need this for parameters?)
The problem is this only works when I access the form.. If I do it from
someone else's computer they get a blank listbox. They have appropriate
permissions for the stored procedure,...
|
by: r3net |
last post by:
I need to pass a parameter @item to a stored procedure
and get back a selection based on value(s) contained in
@item.
@item is a collection of selected items in a listbox as
follows...
ArrayList alItems = new ArrayList();
foreach(ListItem li in listbboxItems.Items)
{
if(li.Selected == true)
|
by: Steve Schroeder |
last post by:
For some reason I cannot get the OnSelectedIndexChanged event to fire for a
listbox I have on a page. I'm able to populate the listbox with data from a
stored procedure, but cannot trigger the event. I do have EnableViewState =
True for the listbox. I'm imagining (wanting) to populate the listbox named:
lstNames by using the DataValueField from lstDepartments.
It's quite apparent though that the event is not triggering as I can misname...
| |
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 extract a dataset back.
1.What should i do while passing the multiple selected values
2.Can i use 'in' clause in SQL procedure like
eg:Select a.xxx from a where a.yyy in @y
|
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
|
by: gayano |
last post by:
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
|
by: binky |
last post by:
Good afternoon folks, I have a performance question if anybody might have suggestions.
Functionally, everything i'm about to describe works as intended. The only problem I'm having is speed.
Assume:
1) Using MS Access 2003 in an ADP project, SQL Server 2000 Enterprise backend
2) Main form is populated by a stored procedure, which works flawlessly
3) There is a listbox on the form that will display matching records based on a key...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |