SQL Server :: Sproc Getting Data From Another Database?

Dec 2, 2010

In my project, I've been told to create a sproc to get some data. Fine. No problem. However, as we're moving away from a solution created by an external consultant I've had to spend a couple of days trying to figure out how the tables are linked. Sure... However, the big problem is that since this consultant is not supposed to know about this move just yet, I've been told to put my sproc in our production database (same server), and I've been unable to find any good info on this on google S

View 8 Replies


Similar Messages:

SQL Server :: Pass Values To Sproc From Sproc?

Jan 9, 2011

[Code]....

pass values to sproc from sproc?

View 6 Replies

SQL Server :: Getting Data From Sproc With Two Selects?

Oct 11, 2010

Anyone know how to do this? I was thinking about making a sproc with something like

select * from users where @group not in member_of
select * from users where @group in member_of

Since I'm dead tired, that's not supposed to be a real query...just an approximation ;)

View 4 Replies

SQL Server :: Make 'providing Data To Parameter In Sproc Optional'?

Feb 3, 2011

i have a stored procedure with multiple parameters. and several statement which utilities a specific set of queries. therefore, every time its not necessary data will be passed through the parameters, so how can i make "providing data to parameter" optional

My stored procedure:

[Code]....

View 2 Replies

SQL Server :: Modfiy A Membership Sproc?

Feb 23, 2011

I have been trying to get this sproc to return all users if null is passed to it from @UserName and a single users if a username is passed to @Username.Can anyone see where I'm going wrong?

[Code]....

View 5 Replies

SQL Server :: SET Statement In Sproc Not Working?

Sep 23, 2010

[Code]....

I want to keep the old password if the user leaves the password field blank, otherwise store the new password.

I have also tried "IS NOT NULL" instead of "= NULL", but without success. I've tried to send in an empty string and a DBNull value but it never keeps the old password.

View 2 Replies

SQL Server :: How To Receive An Output Resultset From A Sproc

Dec 26, 2010

i want to get first picture of any album in photo table. i want get output table for show to the datalist control.i need to get albumid in output

so i create a sproc similar this:

create PROC USP_GETFirstPhoto
@ALBUMID INT OUTPUT,
@CATEGORY NVARCHAR(50) OUTPUT ,
@CAPTION NVARCHAR(50) OUTPUT
AS
SELECT @ALBUMID = A.AlbumID,@CATEGORY=A.Category,@CAPTION=TMP.Caption FROM Albums A
CROSS APPLY
( SELECT top 1 * FROM Photos
WHERE AlbumID=A.AlbumID
)TMP
order by A.AlbumID
DECLARE @x INT,@y NVARCHAR(50),@z NVARCHAR(50)
EXEC USP_GETFirstPhoto @x output,@y output,@z output
select @x,@y,@z

but when i exec this proc i have a recorde not a result set

with this query i have resultset

SELECT * FROM Photos
CROSS APPLY (
SELECT TOP 1 AlbumID FROM Photos
GROUP BY AlbumID)TMP

View 16 Replies

SQL Server :: How To Pass All In A Column To A Variable Inside A Sproc

Jan 7, 2011

I have a table with about 300 OrgID's that I would like to pass into this sproc as the @Org_ID, so I don't have to do them one at a time. How would I do that?

insert into tblRelClients (client_ID, clientRel_ID)

select c1.client_ID, c2.client_ID from tblclients c1 inner join tblclients c2 on c2.OrgID = c1.OrgID
where c1.OrgID = @Org_ID

View 6 Replies

SQL Server :: Call SPROC From Web Application With Temp Table?

Jul 22, 2010

I'm trying to call a linked server, SS2000 that has NText field and instert that data into an nvarchar(120) field on SS2008.

If I execute the SPROC from SS2008 Management Studio, it works fine. If I try to call the SPROC from my ASP.NET 3.5 web application, I don't get any errors, but the data doesn't get updated.

I'm using the following SPROC:
CREATE PROCEDURE [dbo].[usp_UpdateMilestoneDescription]
@UID int
AS
BEGIN

[Code]....

View 7 Replies

Forms Data Controls :: Adding Controls To A Webpage Based On The Results Of A SQL Sproc

May 11, 2010

Depending on the data returned from a Stored Procedure, I need to add specific controls to a page and then when they are populated by the user, write them back to the database. What is the easiest way of doing this?

View 9 Replies

ADO.NET :: Call A Sproc On BtnDelete_Click?

Dec 2, 2010

I've built a Formview, but need to implement some back end functionality - I have a dataset with stored procedures, and am using ObjectDataSources. I've put an asp:button on the page and called it btnDelete, but how do I call the stored procedure ?

Something along the lines of

[Code]....

I want to be able to click on the Delete button, and have it call the stored procedure to delete the record from the dataset...but I don't know C# well enough to be able to work out what the code should be..

View 3 Replies

Web Forms :: Why SPROC Inserting Two Records Instead Of One

Oct 13, 2010

Why am I getting two records inserted into the table, when I'm expecting and needing one? The VB code below is checking whether the HTTP is secure or not, and if it is then execute the SPROC. But for whatever reason, I'm getting two records inserted about 5 seconds apart. Does anyone know why and how to fix? I just need one record.

SPROC [Code]....

VB [Code]....

GLOBAL.ASAX [Code]....

View 4 Replies

VS 2008 - How To Call A Sproc Over And Over With Sqldatasource

Apr 13, 2010

I have a list of numbers I need to submit one at a time to a stored procedure to add to a table. I don't know any other way around this. The database for this is an AS400 so it's not like using mssql server. I have a connection string and use the SQLDatasource controls to select data because I can select a stored procedure with it to call. Now I need to do an update and if it was just one time of submitting information I would do it the same way. But I need to submit each number till I do them all. How can I do this? Do I still use a sqldatasource control and set the value to be pulled from like a session var and just loop through setting the session and then sqlds.databind over and over? I added a DBML but can't do that with the as400 stored procedures as far as adding them like I do mssql.

View 5 Replies

ADO.NET :: Entity Framework 3.5 - Could Not Execute SPROC?

Jul 27, 2010

First I am using Entity Framework 3.5.

I have been listening volumes about this entity framework and though to have a dive in it. I got 3 tables and got the entities and model setup for my database, upto the point where I tried to execute sproc with the datacontext class. I added the sproc to Function Import but as Function Import does not support returning custom dataset that m sproc generates. I googled and found to create Complex Type, but here is the problem, "Get Column Information" in Add Function Import is disabled for me . why the heck its disabled, how to make this work and don't want to revert to older approach just that I could not execute sproc with EF.

View 1 Replies

SQL Server :: Migrate Data Form One Database To Another Database?

Dec 2, 2010

m stuck at one place...i want to tranfer data from one database-1 to another database-2...both databases are for different web application.

Currently i am doing the same using dataset..but the problem is that when Large amount of data is coming in dataset so during the tranfer of data server gives me a Time out Error.

And another thing i am not want to utillise a server memory because there is Lacs of data into the Database for migrate.

View 2 Replies

DataSource Controls :: Get Column From A Sproc With Fetch?

Mar 25, 2010

[Code]....

View 2 Replies

Calling SPROC To Create Temp Table Via Web Application?

Jul 22, 2010

I'm trying to call a linked server, SS2000 that has NText field and insert that data into an nvarchar(120) field on SS2008.

If I execute the SPROC from SS Management Studio, it works fine.

If I try to call the SPROC from my web application, I don't get any errors, but the data doesn't get updated.

I'm using the following SPROC:

[code]....

View 4 Replies

DataSource Controls :: Sproc Insert Into Multiple Tables

Jan 11, 2010

I have a sproc that will insert a new record into Table1. Next I need to Insert into another table the scope_identity of the inserted record. How do I incorporate the scope_identity value as the insert parameter in the second insert statement?

View 3 Replies

DataSource Controls :: Sproc Call To Test SQL Injection?

Feb 18, 2010

I know the following sproc is vulnerable to SQL injection:

[Code]....

I would like to write a call to this sproc that uses SQL injection to execute the additional command:

[Code]....

That way, I can demonstrate the vulnerability of the sproc to SQL injection and test any revised implementations of the sproc using the same test call.

Problem is, SQL injection is harder than I thought! I just can't seem to do it.

Can anyone provide me with text for the sproc call to execute the additional command?

View 1 Replies

DataSource Controls :: Dynamically Changing Linq To Sql Sproc Names?

May 12, 2010

I have to be able to dynamically change the sproc name that is used in a Linq to SQL query. I see in the dbml designer this:

[Function(Name="dbo.InsertUnknownMessage")]

View 4 Replies

DataSource Controls :: Can't Find The Extra Arguments Being Passed To SPROC ?

Mar 18, 2010

I am trying to update a records by calling a SPROC throgh my SQLDataAdapter.Here is my code in this order :

[Code]....

I have looked for parms which are field names with the @ in front but I can't seem to locate them in my code.I could use the assistance of a fresh pair of eyes.

View 2 Replies

SQL Server :: Insert Large Amount Of Data In Sql Server 2005 Database With Every Time Duplicate Check?

Feb 6, 2011

I want to generate 30,000 cards and each card must be duplicate check with database. In my card, there are 2 things. Serial No and CardID. If any card already exists then I generate another card id but with the same serial no.

So how faster way I can generate 30,000 card with duplicate check? Which one I have made application, it takes about 25 minutes to insert.

View 33 Replies

SQL Server :: How To Extract Data From Adobe Pdf Form To Sql Server Database

Feb 23, 2011

I want to extract data from pdf form to sql server database. But I don't know how do achieve it?

View 1 Replies

DataSource Controls :: Copy Data From One SQL Server Database To Other SQL Server

May 21, 2010

how to copy data from one SQL Server database to other SQL server database using two connection string...

View 4 Replies

SQL Server :: Update Remote Sql Server Database From Local Sql Server Database?

Sep 29, 2010

I have a local database which is updated regularly. Now I need a good way to reflect the local database changes into the remote sql server. Both the server have same database structure.

All the above pocess should work automatically from the local database server because I need to update the remote one so that the website visitor can get the updated results in the morning.I need a detailed description/ procedure to accomplish the work.

View 3 Replies







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