I am just starting out with ADO.net Entity Framework I have mapped two tables together and receive the following error:
Error 1 Error 11010: Association End 'OperatorAccess' is not mapped. E:\Visual Studio\projects\Brandi II\Brandi II\Hospitals.edmx 390 11 Brandi II
Not sure what it is I am doing wrong
...
Are there any tutorials or how-to's that explain how to implement an ADO.NET layer?
That would include implementing a Connection class, etcetera.
I need to do this because I am querying an old proprietary system and I want to wrap the old APIs properly.
...
When you call DbConnection.GetSchema you give it the string name of a collection you are interested in. I can't find a list of collections anywhere. Is the list of collections immutable or does it vary by database type (orcle, sql server, etc.)?
I'm interested in getting a list of all collection names in a few database types such as sql...
I have a C# Application I am creating that stores all data in SQL Server.
Sometimes it's easier for me to make data changes programmatically and sometimes it's easier to have stored procedures and functions in the SQL Server database and call them.
I am rather new to programming and I don't know what the subtle advantages and/or disa...
I am using C# to write a method that returns the following information about a table:
column names, column types, column sizes, foreign keys.
Can someone point me in the right direction on how to accomplish this ?
...
Assume the Stored Proc takes 10 minutes to run and returns no data.
What is the proper way to call a stored procedure in SQL Server and have your code not wait around for the result? Is there a way to handle it from the T-SQL or the connection? Something that works in ADO.NET and classic ActiveX ADO?
The only way I thought of is:
1) Cr...
I'm trying to determine at runtime what the SqlDbType of a sql server table column is.
is there a class that can do that in System.Data.SqlClient or should I do the mapping myself? I can get a string representation back from
SELECT DATA_TYPE, CHARACTER_MAXIMUM_LENGTH
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_CATALOG = '{0}' AND T...
Hello we have an SQL server application running over a low bandwith connection.
We use ADO.NET.
I was wondering if anybody has any tips on minimizing traffic over the channel.
Im looking for answers on ADO.NET/SQL-Server specific tips that make it more efficient.
Not obvious answers like "dont fetch many records".
En example for MySql...
I've got a .Net web system with a VB.Net front end talking to a SQL Server 2005 back end over ADO.Net. Essentially, what I want to do is this:
Dim command As SqlCommand = New SqlCommand("", connection)
command.CommandText = "SELECT * FROM someTable ORDER BY orderValue @SortOrder"
Dim sortParam As SqlParameter = New SqlParameter("@SortO...
Does anyone know if the SqlDataAdapter.Dispose method actually closes or disposes any SqlConnections? I loaded up Reflector and I see that SqlDataAdapter inherits from DbDataAdapter. If I disassemble and look at the dispose method in that class, there appears to be no disposal of any SqlConnections. I suppose I could write a test for ...
Is there any concept like RDS(Remote Data Services) in .net ???
...
Context
My current project is a large-ish public site (2 million pageviews per day) site running a mixture of asp classic and asp.net with a SQL Server 2005 back-end. We're heavy on reads, with occasional writes and virtually no updates/deletes. Our pages typically concern a single 'master' object with a stack of dependent (detail) obje...
I'm trying to define a 1:1 association between two entities (one maps to a table and the other to a view - using DefinedQuery) in an Entity Framework model.
When trying to define the mapping for this in the designer, it makes me choose the (1) table or view to map the association to. What am I supposed to choose? I can choose either of ...
What are the performance tips that every ADO.NET EF developer should know about?
Please put each tip per answer and explain why the tip is good (e.g. by minimizing DB roundtrips).
...
I'm wondering how to add several data tables that I've built in code, to a blank MDB file that ships with my app.
I find it easy enough to connect to the MDB file via the OledbConnection object, but then I'm at a loss for an easy way to add my tables to it. There it sits...open...and empty, but what next?
I can add my tables to a datas...
Suppose my stored procedure is:
IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'sp_QB_descriptionwise_select')
BEGIN
DROP Procedure sp_QB_descriptionwise_select
END
GO
CREATE Procedure sp_QB_descriptionwise_select
(
@description nvarchar(max)
)
AS
declare @type int
SELECT Question.questi...
We all know that DataReaders are quicker than DataTables since the a DataReader is used in the construction of a DataTable.
Therefore given that I already have a DataTable.... Why would I want to convert it to a DataReader?
Well I am creating an internal interface called IDataProvider. This interface is intended to be implemented both ...
Does anyone have any thoughts on this method? I have did some performance testing on it and it seems to perform worse than simply doing a dataadapter.fill call or just looping through the datareader and creating new rows for the table. Do people use this in production, or is this just another thing Microsoft gave us that we don't use?
...
Take a look at these two queries:
-- #1
SELECT * FROM my_table
WHERE CONTAINS(my_column, 'monkey')
-- #2
SELECT * FROM my_table
WHERE CONTAINS(my_column, 'a OR monkey') -- "a" is a noise word
Query #1 returns 20 rows when I run it in Management Studio.
Query #2 returns the same 20 rows, but I also see the following in the Messages t...
I'm getting this error every few days. I won't see the error for a few days then I'll get a flurry of 20 or so all with in a minute or so.
I've been very thorough going throw my code so that I'm using this basic setup for my DB access.
try
{
myConnection.Open();
mySqlDataAdapter.Fill(myDataTable);
myConnection.Close();
}
Catch (E...