473,654 Members | 3,129 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS2005, dataSets and stored procs (how annoying!)

Hi...

I have a dataset with queries in them. I want to switch out the queries for
stored procs. When I tried to redefine the select query as a stored proc, I
get this error:

Cannot remove unique constraint 'Constraint1'. Remove foreign key constraint
'fk_NewsHeader_ NewsArticles' first.

Any idea what the problem is and how to fix it? The other problem is when
this does work, it redefines a new tableAdaptor in the name of the stored
proc... how confusing...

Dec 5 '07 #1
1 1256
The LoadDataSet command can help you.

http://msdn.microsoft.com/msdnmag/is...DataPoints/#S8
You'll have alot less headaches if you use the EnterpriseLibra ry.Data
application block.

"Andy B" <a_*****@sbcglo bal.netwrote in message
news:e0******** ******@TK2MSFTN GP06.phx.gbl...
Hi...

I have a dataset with queries in them. I want to switch out the queries
for stored procs. When I tried to redefine the select query as a stored
proc, I get this error:

Cannot remove unique constraint 'Constraint1'. Remove foreign key
constraint 'fk_NewsHeader_ NewsArticles' first.

Any idea what the problem is and how to fix it? The other problem is when
this does work, it redefines a new tableAdaptor in the name of the stored
proc... how confusing...

Dec 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8500
by: nate.hughes | last post by:
Ok, here's my dilemma. We're running SQL Server 2000 with the default db setting for the ANSI_WARNINGS option set to off. However, we still get "Warning: Null value is eliminated by an aggregate or other SET operation" messages. To eliminate getting the message, we use the SET ANSI_WARNINGS OFF in our stored procs. Using that SET command forces a recompilation of the SP and is causing locks/blocking. Anybody else run into this problem...
0
1536
by: nate.hughes | last post by:
Ok, here's my dilemma. We're running SQL Server 2000 with the default db setting for the ANSI_WARNINGS option set to off. However, we still get "Warning: Null value is eliminated by an aggregate or other SET operation" messages. To eliminate getting the message, we use the SET ANSI_WARNINGS OFF in our stored procs. Using that SET command forces a recompilation of the SP and is causing locks/blocking. Anybody else run into this problem...
6
3087
by: Dave | last post by:
1) I know that we can define an external proc to be Fenced or NotFenced on "CREATE PROCEDURE" command. I don't see the FENCED / NOT FENCED option on "Create Procedure" for SQL stored procs. Is it always "NotFenced" for SQL stored procs by any chance ? We are in the process of migrating a SQL server app to DB2 with 2000 stored procs and the DB2 server keeps crashing too often during stored procs execution. 2) I have read somewhere...
0
1090
by: Mike | last post by:
Is anyone using cobol for the stored procs? How's that working for you? Mike
1
1717
by: Paul R | last post by:
Hi, I have a Winforms application that access some SQLServer2000 stored procedures. I have now written some new Webforms pages to use some of the same stored procs. The Webforms use the SAME data access classes (all of my business logic and data access classes are in DLLs that are shared between the Winforms and Webforms).
1
1709
by: kentk | last post by:
Is there a difference in how SQL Server 7 and SQL 2000 processes SQL passed from a program by an ADO command object. Reason I ask is I rewrote a couple applications a couple years ago were the SQL statements were inline. I basically took the SQL statements and put them into stored procs, were there were variables in the code I used SQL parameters in the stored procs. I got some amazing performance results by switching to stored procs. ...
15
2271
by: Burt | last post by:
I'm a stored proc guy, but a lot of people at my company use inline sql in their apps, sometimes putting the sql in a text file, sometimes hardcoding it. They don't see much benefit from procs, and say anyway they're are db specific- what if we change from SQL Server to Oracle one day? What say you experts? Is this one of those "no right answer" questions? Thanks,
8
2621
by: Frank Calahan | last post by:
I've been looking at LINQ and it seems very nice to be able to make queries in code, but I use stored procs for efficiency. If LINQ to SQL only works with SQL Server and stored procs are more efficient, what use is LINQ to SQL, other than to have a simpler way to call my stored proc?
5
4070
by: Bogdan | last post by:
Hi, I have a stored procedure that uses JOINs to return columns from multiple tables. I also have another stored proc that that takes a series of params and updates multiple tables. I used the framework to auto-generate a table adapter specifying both stored procs as Get/Fill and Update. The problem is that columns from the JOINed table seem to marked as 'read-only' so trying to update a row results in an exception. BTW, by default a...
0
8285
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8706
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 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...
1
8475
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7304
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6160
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 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...
0
5621
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();...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1592
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 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...

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.