DataSource Controls :: List Box - Pass The Value To SQL Stored Procedure?

Jan 20, 2010

I have a form that I need to add a new multiple selection criteria. I added a List Box and I populate it on Load. After user selected his choices I need to pass the values to SQL Select stored procedure. I use C# and SQL. I am not sure how to pass the values and write SQL statment that would select records with the selected values. I also have RAD Teleric list box but again the values need to be passed to sql.

View 2 Replies


Similar Messages:

DataSource Controls :: Can Pass A Non-key Values To A Stored Procedure

Jan 11, 2010

I've changed the definition on one of my tables by removing a field from my data key. However, I still want to pass this field to my stored procedure that inserts fields into this table from another table. The field in question is called ignum. I was using the code

[Code]....

View 5 Replies

DataSource Controls :: Pass A Parameter In To A Stored Procedure In SQL?

Feb 17, 2010

how can i pass a session variable in a C# web form to a stored procedure..?

View 1 Replies

DataSource Controls :: How To Pass Parameters To Stored Procedure

Apr 30, 2010

Ive tried a few ways of doing this without success and got together a simplified example so hopefully I can get an answer. When I try to INSERT using a stored procedure InsertTest (normal SQL works OK) I cannot. I need to know how to pass the @Model parameter to the Stored procedure

Have a Stored procedure which can be executed and after entering string for @Model through wizard a new record is created

My asp:SqlDataSource includes InsertCommand="InsertTest" InsertCommandType="StoredProcedure"
Also my <InsertParameters includes the asp:Parameter Name="Model" Type="String"/>

My drop down (and I think this is where the problem is ). Record is Inserted after choosing Model and pressing enter

Do I have to set one of the properties in the drop down to tell the Stored procedure the parameter being passed is the parameter Model ??

[Code]....

View 4 Replies

DataSource Controls :: Pass Value In Querystring To Stored Procedure?

Feb 7, 2010

.cs code is

[Code]....

and .aspx code is

[Code]....

now i want to pass value in Reply.aspx?C={0} to stored procedure

View 3 Replies

DataSource Controls :: Pass Collection To A Sql Stored Procedure?

Mar 9, 2010

i have a listview control with two textboxes in each row. i am to fill those and save their values in one/more than one database tables using a stored procedure.

i currently create a comma-separated string (using a string builder) of all the values, and then pass it as a parameter to the SP.

in the SP i extract the values, and put them into my tables.

View 4 Replies

DataSource Controls :: How To Pass The Selected Value Of A DropDownList To A Stored Procedure

Dec 6, 2010

The title pretty much says it all.

I'm trying to pass the selected value of a dropdown list to a stored procedure that will return a set of results based on the value passed.

View 3 Replies

DataSource Controls :: Pass The ID And SelectedDate Values In To The Stored Procedure As Parameters?

Jun 14, 2010

How do I pass the ID and SelectedDate values in to the stored procedure as parameters??

[Code]....

View 2 Replies

SQL Server :: Pass List To Stored Procedure?

Oct 1, 2010

I'm looking to pass a list into a stored procedure, stored as List<myClass>. I've passed a table in before but I'm not sure how to pass a list.

View 1 Replies

DataSource Controls :: How To Pass Multiple Values And Execute Query In Stored Procedure

Jun 2, 2010

basically i have two dropdown boxes to filter data and textbox with stored procedure bound to gridview.i want to be able to query data depending on the selected value passed,either using one or more parameter values.

i would like seperate sqlcommands to chose from depending on which controls i select to pass parameters.

i have included a parameter Select(control id) as this is declared by the wizard for stored procedure.

but i am not sure how it is defined on the page and passed to procedure.

[Code]....

View 2 Replies

DataSource Controls :: How To Convert The Oracle Stored Procedure To Sqlserver 2005 Stored Procedure

Apr 2, 2010

This is surareddy. i nead some small clarification in the "Stored Procedure"

how to convert the oracle Stored Procedure to sqlserver2005/2008 Stored Procedure.

right now i am enhancing the project that project already developed the oracle Stored Procedure. now our company is using sqlserver 2005/2008.

how to convert the Oracle Stored Procedure to sqlserver 2005 Stored Procedure

View 4 Replies

DataSource Controls :: Do Not Use Or Call Any Stored Procedure But It Says "Could Not Find Stored Procedure 'xxxxx'?

Dec 9, 2010

Initially, I have tried to use stored procedure. But I changed my mind and preferred to call sql query in codebase with command text. However, it stills tries to find initially-called stored procedure (which is neither called or exists).I think that it is related caching. But I tried it with different browsers it did not work.What might be the reason?

View 4 Replies

DataSource Controls :: Execute A Stored Procedure Within A Stored Procedure?

Jan 18, 2010

Does anybody if it is possible that a stored procedure returns rows which is the result of the execution of another sp? Something like..

[Code]....

View 11 Replies

DataSource Controls :: How To Call A Stored Procedure In Another Stored Procedure

May 13, 2010

i want to return output parameter from 1 storeprocedure. into another stored procedure.

View 7 Replies

Forms Data Controls :: Populate Drop Down List Using Stored Stored Procedure

Mar 14, 2010

i want data to drop down list using stored procedure .

However im not able to do that.

View 3 Replies

DataSource Controls :: Call One Stored Procedure In Another Procedure For Search?

May 1, 2010

I want to apply other stored procedure select query on result of first stored procedure.

View 1 Replies

DataSource Controls :: Stored Procedures Are Not Showing Up Correctly In The Stored Procedure Drop Down

Apr 27, 2010

I am using Visual Studio 2008 and SQL Server 2008 and have added a SQL datasource to my form.

When I configure the datasource, I choose my connection string which looks like this in my webconfig:

<connectionStrings>

<add
name="PSFSPRD_ConnectionString"
connectionString="Data

The database I am using has a schema called EQB and as such, my stored procedures are named as EQB.usp_SelectFunds, EQB.usp_SelectAccount, etc.

On the select tab of the Configure Data Source screen, I choose to use a stored procedure. The dropdown shows my stored procedures, however, the schema name does not show up in front of the stored procedures in the drop down. I see only usp_SelectFunds, usp_SelectAccount, etc.

I select one of the stored procedures and when I click TEST, I get the message that the stored procedure is not found. If I instead choose to use a SQL statement instead on the configuration screen and enter EXEC EQB.usp_SelectFunds and click TEST, it works fine.

Why are my stored procedures not showing up correctly in the stored procedure drop down and how can I fix this?

View 3 Replies

Forms Data Controls :: Update GridView - Pass Current User To Stored Procedure?

Feb 26, 2010

I have a page, let's called that Parameter page, displaying data from a database table using GridView. (The database is a SQL database.) I allow editing of data in GridView. The GridView uses stored procedure to retrieve data and to update data. In my project, users need to log in before using my asp.net project. So at every page, I know who the current user is by using HttpContext.Current.User.Identity.Name. Now as requirement changes, I need to record who has changed what (row) in the Parameter page. The information is to be written to a new table - audit log. Therefore I do not expect to change the Parameter table structure.

I have modified the stored procedure retrieving data. It returns one more column - an empty column with name currentUser. So GridView will create one more column. After data bound, I have the GridView_DataBound() to popluate that column using HttpContext.Current.User.Identity.Name.

I debug it in Visual Studio and am able to see the name of current log in user as the last column in GridView. I change the update stored procedure to take in one more parameter. That parameter, currentUser, takes default value. The default value is an empty string. So if UI part fails to send in the current user name to stored procedure, it just write the empty string as the user name. I change the <asp:SqlDataSource>. I add a <asp:Parameter> for currentUser.

[Code]....

I debug in Visual Studio. However when I save the change, the SQL profiler shows UI sends in @currentUser as NULL. Why?

View 7 Replies

Forms Data Controls :: Dropdown List Populated By SQL Stored Procedure?

Apr 29, 2010

My dropdown list is populated by a group of names inalphabetical order.

However, I would like "Please Select Name" to be the first item in dropdown list.

View 5 Replies

DataSource Controls :: To Use Stored Procedure In .net

May 30, 2010

how to use stored procedure in asp.net for for manipulation form sql server (in details).

View 2 Replies

DataSource Controls :: Stored Procedure In .net?

Mar 31, 2010

parameters inside the stored procedure.How to write .

View 6 Replies

Pass An Array To Stored Procedure?

May 13, 2010

I have a page with list box and user can select multiple values from that lst box. Now what I want to do is when user submits the page I want to generate a comma seprated string that contins the ID's of values selected and pass this string to stored procedure. String would look like something like that '2,5,9'

Now my question is how can I split these ids in my stored procedure and get the records based on these ID's. In want to pass this array to Source coloumn in the follwoing Stored procedure and get the data. Right now following stored procedure is working on the basis of single source id passed to it.

[Code]....

View 2 Replies

Databases :: Pass Value Into Stored Procedure?

Jun 5, 2010

var a=conn.getData2();//getting the value from a global class conn.cs
OracleConnection con = conn.s();
OracleCommand oc = new OracleCommand("logedin(I need to pass the value here)", con);

logedin is strored procedure :-

create procedure logedin(user_id in int)
as
begin
update user_details set status='logedin'
where userid=user_id;
end;

i would lke to pass the value into the stored proc that was retrieved by the variable into the database.

View 4 Replies

DataSource Controls :: Could Not Find Stored Procedure?

Jun 17, 2010

I created a database on SQL Server 2005 developer edition with MS SQL Server Mangement Studio Express. Now I created code that accessess a stored procedure named 'pS_TableData'. However I have one problem the code raises an exception "Could not find stored procedure 'pS_TableData 'Letters''."the code looks like this:

[Code]....

Note I am using (for now) the same connection that I used to create my database so in essence my web site is the administrator. I tried a simple SELECT from a table with the same connection and it raised no exceptions!When I run EXECUTE ps_TableData 'Letters' in SSMS it has no . I also tried EXECUTE ps_TableData 'Letters' as the command paramated for SqlCommand but it had the same effect

View 1 Replies

DataSource Controls :: Stored Procedure Not Returning Value

May 15, 2010

I call this stored procedure with a dataset. It always returns a 0 but should return a 1 or 2. Does anybody know why it isn't returning a 1 or 2.

ALTER PROCEDURE dbo.sp_InsertLinkVote
@LinkId int,
@LinkVoter nvarchar(50),
@LinkVotesDateTime datetime,
@LinkVotesGoodBad bit
AS
/* SET NOCOUNT ON */
 
If EXISTS
(SELECT
*
FROM
LinkVotes
WHERE
LinkId=@LinkId
and
LinkVoter = @LinkVoter )RETURN
1
ELSE
INSERT INTO
dbo.LinkVotes (LinkId,LinkVoter,LinkVotesDateTime,LinkVotesGoodBad)VALUES
(@LinkId,@LinkVoter,@LinkVotesDateTime,@LinkVotesGoodBad)RETURN
2

Here is were a call it in my code behind.
Dim VoteCheck
As
Integer
Dim InsertVote
As
New DataSetStoredProceduresTableAdapters.QueriesTableAdapter
VoteCheck = InsertVote.sp_InsertLinkVote(LinkId, User.Identity.Name, DateAndTime. Now,
True)
'0 is a good vote.
If VoteCheck = 0
Then

It seems to insert and not insert correctly, I just cannot get it to return the correct value.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved