DataSource Controls :: Dataset Sorted By Temporary Column Created By Stored Procedure?

Mar 27, 2010

I have a stored procedure in my database that sorts a dataset by distance from the specific address input by the user. The distance is created among each individual users query and the sorting of distance occurs within my stored procedure, the distance is not returned in the output. Is there a way I can create a temporary column that returns the distance so that I can give the user an option to sort by distance?

View 9 Replies


Similar Messages:

DataSource Controls :: Filtering DataSet Using Stored Procedure

Mar 24, 2010

I'm working on an application that allows our Office Services people to schedule employee location moves. The page I'm currently working on allows for modification of scheduled moves. When the user attempts to save changes in this page, the app runs a stored proc to see if there are any conflicts, e.g., someone already sitting in the new location, someone scheduled to move into the employee's location before the employee is scheduled to move, etc. These conflicts, if any, are then displayed for the user and he/she has to make changes to one or more moves to resolve the conflict. This all works just fine. My problem comes when the user has resolved all the conflicts (or thinks he or she has). I need to check again to make sure that there are not still conflicts somewhere before allowing the data to be saved back to the database. So, I've got data for at least two scheduled moves, but this data does not necessarily match what's in the database.

I want to run the same stored procedure that I initially used on this dataset. The stored proc uses three database tables, plus the proposed move information to check for conflicts. What I'm trying to do (but please tell me if there's a totally different approach that would be better) is I've created 3 DataTables, using the 3 tables that my stored proc uses. The tables are Employee, Location and Moves. I've then put all these tables into a DataSet. I've updated my Moves DataTable with the proposed new move information. Now I want to run my stored proc on this dataset to see if I get any rows (i.e., if there are still any conflicts). But I can't just run the stored proc; it references the tables in the database. I want to run my stored proc on this DataSet. The stored proc is very long and takes 5 parameters which are referenced all through it, so I don't want to just create a DataViewManager using the SQL.

View 10 Replies

DataSource Controls :: Stored Procedure Does Not Indicate Table Returned In Dataset?

Apr 23, 2010

This may not be the correct place to put this as it is both a stored procedure AND Visual Studio 2008 problem.

I have the following stored procedure:

[Code]....

I have been mokeying around with it because of what is happening. I have a dataset, call it dataset1. I drag this stored procedure onto the dataset. I EXPECT a datatable to appear, instead the data set adds this store procedure to the queries table adapter and sets the exec mode to 'NonQuery' which unless I am very mistaken, means "don't expect a dataset back from this' when in fact you DO expect a dataset back from this.

The SQL server is a Windows 2000 Server running SQL 2000. It has never caused us a moments grief since we set it up oh-so-many years ago.

If I connect to a different database and drag a query into the same dataset I get a datatable as I expect. I cannot see where / how this procedure could be wrong. The query when executed returns exactly the data I expect, in the format I expect (looks like a table, acts like a table in the Query analyzer).

View 3 Replies

DataSource Controls :: Filtering A Column With A Stored Procedure?

Jan 10, 2010

I am trying to filter a column for when the text matches "True" in the column. I am using the following syntax, don't get an error, but it isn't working.

Select ContactID,FirstName,LastName,Officer,Title
from Contacts
Where officer
=
"True"

View 2 Replies

DataSource Controls :: Passing Column Name As Parameter To Stored Procedure?

Feb 12, 2010

ALTER procedure [dbo].[Sample2]
@Col as nvarchar(1000),
@Value as nvarchar(1000)

[code]...

View 5 Replies

DataSource Controls :: Stored Procedure - Insert Null In Foreign Key Column?

Apr 22, 2010

I am trying to create a stored procedure where I can insert null values in columns that have a foreign key constraint and allow nulls. The columns I am trying to insert nulls into are commentid and imageid. I have created an Insert statement in a stored procedure and I get the foreign key constraint error. Can you tell me how to allow inserting data in the other columns without having to insert anything in the commendid and the imageid?

Here is my exec of the stored procedure that is not working:

[Code]....

[Code]....

View 6 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

SQL Reporting :: How To Add Stored Procedure Result Set Columns To Typed Dataset And Dataset To RDLC File

Jan 9, 2011

Till now I used to design RDLC file before and assigned typed dataset table columns.Report processing mode is local. But now my stored procedure returns different columns based on condition i.e columns are not fixed every time. Now I need to add that columns to typed dataset and dataset is assigned to RDLC file. So dataset and RDLC files are create dynamically based on stored procedure result set columns.

View 1 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

ADO.NET :: Different Stored Procedure Data Into Single DataSet

Aug 6, 2010

I have a small query can we store three different stored procedure data into single dataset (in multiple tables). I am asking this because I have three stored procedure and when I run them simultaneously it takes less time to execute and when I run them separately it takes more time and I want to use all three stored procedure in page load.
Environment - SQL Server 2005, ASP.net 2.0

View 7 Replies

ADO.NET :: Getting Data From Stored Procedure To DataSet Using Linq

Mar 5, 2011

I have function like
Public Dataset getdata() {
dataset = db.prcGetdata("name");
return dataset; }
db is linq. prcGetdata is a proc which accepts name param and returns 1 or more rows. So, my requirement is how to get data to dataset using linq.

View 3 Replies

Security :: Use A Dataset Stored Procedure To Insert Data

May 29, 2010

I am trying to insert a UserID column into a database table during membership creation. I have my tables set up in a dataset with the stored procedure in there. Now I am trying to call that stored procedure in the newuserwizard code and I it is not recognizing the stored procedure. I know it is because my dataset is not referenced in the newuserwizard code. Here is the code I am using:

[Code]....

The name of the stored procedure is "InsertUserID". I think I need to create a function that references the ataset but I am not sure how to do this..

View 6 Replies

Passing Whole Dataset To Stored Procedure In MSSQL 2005?

Oct 5, 2010

How do I pass a dataset object to a stored procedure? The dataset comprises multiple tables and I'll need to be able to access them from within the SQL.

View 3 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

Trying To Create Dataset (.xsd) And Link It With Stored Procedure In MySQL Database?

Jan 20, 2011

I am trying to create dataset (.xsd) and link it with stored procedure in MySQL database. the problem is when i connect it it's changing the schema name. like if I have this stored procedure name or table name or whatever :

News.tbNews the builder it self change it to :

def.News.tbNews. MySql version 5.5.8, MySqlConnector 6.3.4 I searched for a solution for this problem and one of the answers was to change the MySqlConnector from 6.3.4 to 6.3.6 !!! I download the new connector 6.3.6 but it's giving me Error while installing it.

View 1 Replies

Web Forms :: Binding Stored Procedure To RDLC Report Via Dataset?

Jun 6, 2012

i cretaed a dataset from storedprocedure & binding to .rdlc report when i preview the data in dataset i get the output but i am not getting the field names by which i can make the report

i am not able ot bind the columns on report i cretaed a dataset from stored procedure but i am not getting the firld names for adding it to the rprot

View 1 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

DataSource Controls :: Returning Value From Stored Procedure

Jun 23, 2010

I am developing a page in ASP.Net where I have the user enter a letter into a textbox. They then click a submit button and I all of the userids that start with that letter are to be displayed. So I need the SP to go through the database and match first letters with what was entered. Here is what I have as my code for the SP:

CREATE PROCEDURE dbo.exp2 @testchar Char(1)
declare @flag as char(2)
set @flag = @testchar + '%'
select userid
from ex_database
where userid like @flag

View 6 Replies

DataSource Controls :: Where To Save Stored Procedure

May 25, 2010

So I'm working with SQL Server 2005 and I'm having trouble saving a stored procedure. (I've only used an Apache server before, and for nothing as complex as the project I'm working on)

Nonetheless, the problem is that I don't know where to actually save the stored procedure I create. In my Object Explorer, I go to the database I want to create it in, expand Programmability, right click on Stored Procedures and choose to create a new one. That's all nice, but when I'm ready to save and test it from my webpage, it asks where to save it. This is probably dumb of me, but I don't know where to. I try to save it on the desktop and click/drag to the Stored Procedures folder in my database, but all that does is open it, not actually store it in the database. Maybe I'm getting the point of stored procedures wrong? Let me know what I should do to save it in the right place so I can access it.

View 8 Replies







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