.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Differences between SQL Server database definition and dynamyc data .edmx model

Posted By:      Posted Date: October 24, 2010    Points: 0   Category :ASP.Net

I am trying to customize a ForeignKey_Edit under a different name but I am having a problem with this: If I am listing one of the entities I have 4 columns that appear as links. My guess is that they are the Foreign Keys because they are the same fields listed as DropDownLists on top of the page.

One of this fields is the one I am trying to customize but if I use the UIHint attribute or property I got an error message saying that the columns can't be used as a Foreign Key because it isn't  a Foreign Key, but it is.

I have checked the database definition and in it the column appears as Foreign Key but in the Dynamic Data .edmx model appears as a simple field because it doesn't show the small key on the left icon. Only primary keys have the key.

Is this a bug or am I going the wrong direction?


View Complete Post

More Related Resource Links

Hierarchy ID: Model Your Data Hierarchies With SQL Server 2008


Here we explain how the new hierarchyID data type in SQL Server 2008 helps solve some of the problems in modeling and querying hierarchical information.

Kent Tegels

MSDN Magazine September 2008

Metadata: Create a Database Schema Repository with Meta Data Services in SQL Server 2000


SQL Server 2000 Meta Data Services is a repository technology that stores and manages metadata for SQL Server. Instead of building database schemas over and over, Meta Data Services allows you to freeze an entire schema for use in other projects. You can also use these schemas for training, testing, or debugging. In this article, the authors will review the various components of Meta Data Services and show how it can be programmed using a Visual Basic client, XML, and XSLT. They will also show you how to manage and manipulate your metadata by generating a simple database schema using a SQL Server repository.

Alok Mehta and Ricardo Rodriguez

MSDN Magazine May 2003

Entity Data Model and database view returning the same columns as there are in a table


When adding a stored procedure into the Entity Data Model I can select whether the procedure returns a scalar, a (new) complex type or one of the entity types I already defined. 

How do I do something similar for a view?

I mean assuming I have a view like this

CREATE VIEW FilteredFoos as SELECT Foo.* FROM Foo join ... WHERE ...

(that is a view that implements some involved filtering, but returns all columns from one table) how do I add it to the project so that I can use the entity set, but get the Foo objects, not some new FilteredFoo objects.

var foos = myDB.FilteredFoos.Include("Bar").ToList();

foreach (Foo foo in foos) { ...

Thanks, Jenda

Insert Excel Data via File Upload into sql server database???

Hi all, I have requirement that User can Upload the Excel Sheet Data to sql server Database at once. How i do that Any Article or hint is apperciated.   Regards 

Facing MSDTC related issues while archiving data from one database server machine to another databas

I have a question with respect to distributed transactions when carried out between two database server machines on the same network.   Consider there are two database server machines \SOURCE_DATABASE_SERVER\ and \DESTINATION_DATABASE_SERVER\. Now we have to archive the data from one database server to other database server.   Let us suppose the database server \SOURCE_DATABASE_SERVER\ is the live production database server and \DESTINATION_DATABASE_SERVER\ is Long term storage database server. Now data from \SOURCE_DATABASE_SERVER\ needs to be archived into the database server \DESTINATION_DATABASE_SERVER\.   So I have written a dynamic stored procedure which includes distributed transaction (begin Tran, commit Tran, rollback            Tran) coding in it.   Now initially when I executed the procedure, it gave some of the following errors   1) OLE DB provider "SQLNCLI" for linked server "\DESTINATION_DATABASE_SERVER\" returned message "The partner transaction manager has disabled its support for remote/network transactions.". Msg 7391, Level 16, State 2, Line 1 The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "\DESTINATION_DATABASE_SERVER\" was unable to begin a distributed transaction.    

Best way to send data to report server from merge replicated database

Hi ALL,              I have merge replication configured on database say Testdb on production server. I want data from testdb(merge replicated) database to send to report server. How can i accomplish this....Whts the best way to send data at regular intervals to report server.. Any suggestions plz TIA

model report from two different data sources SQL server and access DB

Can we merge two model reports into one . One model report is from SQL server and another one from Access DB. How is that possible. Can you please give a idea how to do that. I need to display data from sql server as well as access DB using model report.  I need to get data from two different sources like sql and oracle or SQL and access db. So can combine tables from these data sources into the DSV or model. I need to use it in a report   Thanks Madhavi

Questions on Multi-Tenant Data Architecture for SQL Server Database and ASP.NET application

My company wants me to make the same asp.net application and sql server database be sharable amongst different clients. Clients will use the database for their own business use, will have their own data, we will have our own data. How can I share the same SQL Server database amongst different clients having same ASP.NET application (but somehow be able to differentiate which client user is logging in) ? Do I need to use ApplicationID and how will I detect at login which one to use ? I know I will need to add another field in all tables to differentiate client's data from ours.  

buffer data from a sql server database file

I'm in need of a sample code that will let me buffer data from a database so that I can go next> and <prev in a database file. Does someone have an idea on now to do this. Joe      Toppers BBS http://toppersbbs.dtdns.net C# Windows and Console applications. PHP, Mysql. HTML

SSIS 2005 - XML Source no data loading to sql server database destination

Hello I am trying to load data from xml source to sql server destination, but the task executes with no data loaded to destination. i really appreciate any guidance in working and troubleshooting xml sources. Regards Harris

How to submit data to a SQL Server database table from a custom page ?

Using SPD, I have created a custom page. It has a form with ASP.NET controls textbox, radio buttons, dropdown, submit button etc., Also, I created a Database connection (to the SQLServer database table) under Database Connections. But not sure how to connect this form to the database connection so that when form data is submitted, the data will be inserted into the table.

Can I create an ADO.NET Entity Data Model for a MySQL database using Visual Web Express 2010?


Can I create  an  ADO.NET Entity Data Model for a MySQL database using Visual Web Express 2010?

If yes, are there any documentation or tutorials?


How do you create a ADO.NET Entity Data Model for a MySQL database using Visual Web Express 2010?


Can I create a ADO.Net Entity Data Model for a MySql(5.0.1) Database using a Visual Web Express 2010? If yes, can anyone please let me know how to do this.

Incremental data load from MySQL database to SQL server 2008 using SSIS


I am looking for best solution to perform incremental data load from MySQL database to SQL Server 2008.  I tried to follow instructions from articles on incremental data load in SSIS  using MD5 hashes but I failed to make connection in Lookup transformation editor between MySQL Id (4 byte unsigned integer) and Id in SQl Server 2008 table which is  bigint. i tried to add  data conversion and convert MySQl Id to string. It works fine when you map this field directly to OLEDB destination but in Lookup component it failed. 


Any input greatly appriciated.



Optimizing Data Mining processing time for a Time Series model in SQL Server 2008 R2


Does anyone have any references around optimizing the initial processing time for a data mining model? Books, blogs, etc. I have the Wiley “Data Mining with SQL Server 2008” book, and while I’ve learned a lot from it, it doesn’t seem to cover much around trouble shooting things like processing time. I also have a few other books that have a chapter or two on data mining, but again just basic “here’s what it is and how to set it up”, nothing that quite covers trouble shooting or optimization. I’ve also checked out the various Data Mining blogs/sites.


I’ve got a Microsoft Time Series model I’m basing on a Cube. Very simple, trying to forecast sales. I have one dimension which is the list of products (about 1600), a second which is the time dimension, finally the measure is daily sales figures for each, about 3.2 million rows in total. On a brand new server, with two quad core processors and 16 gig of ram it took 40 hours to process. Seems rather high?

sql server will not start - Database 'model' cannot be opened. It is in the middle of a restore.

Sql server service will not start after server reboot:

2009-08-13 14:15:43.94 spid7s      SQL Trace ID 1 was started by login "sa".
2009-08-13 14:15:43.97 spid7s      Starting up database 'mssqlsystemresource'.
2009-08-13 14:15:43.97 spid7s      The resource database build version is 10.00.1600. This is an informational message only. No user action is required.
2009-08-13 14:15:44.30 Server      A self-generated certificate was successfully loaded for encryption.
2009-08-13 14:15:44.30 spid7s      Server name is 'WIN-37R9WFWAJIB\MSDB1'. This is an informational message only. No user action is required.
2009-08-13 14:15:44.32 spid10s     Starting up database 'model'.
2009-08-13 14:15:44.32 Server      Server is listening on [ 'any' <ipv6> 49167].
2009-08-13 14:15:44.33 Server      Server is listening on [ 'any' <ipv4> 49167].
2009-08-13 14:15:44.33 Server      Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSDB1 ].
2009-08-13 14:15:44.33 Server      Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ].
2009-08-13 14:15:44.35 spid10s     The database 'model' is marked RESTORING and is in a state that does not allow recovery to be run.
2009-08-13 14:15:44.38 Server      Server is listening on [ ::1 <ipv6> 491

create an infopath form that receive and submit data to sql server database in the same form



i want to create an infopath form that can receive the data out of the slq server database and edit the data in the database and then submit it.

here is what i did so far.

i created a data connection to a sql server database to SUBMIT the data.

also i created a data connection to the same sql server database to RECEIVE the data.

when i open the form the user and the user's details are already filled in the form, now i need to let the user edit the data in the fields or add a new data in a field and then the form need to be submitted to a temporary database to be checked first by an approver and after approval the form must be submitted to the real sql server database.

i tought about that the approver just need to click a button and the data will be submitted to the the real database.

both the temporary and the real database has the same tables and fields.

i just need to know how to edit and submit the data to the temporary later to the real database



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend