Hi,
I am just getting started with the ADO.NET Entity Data Model and I was curious as to what was the best way of extending my entities behaviour.
Say I have a table called "Customers" and I create an entity model based on this table. I now have a "Customers" entity class. I want to now add some methods to this class and also make it i...
Hi all,
I have there 2 codes on how to connect to SQL Server 2005 database. code 1 are using Dataset, and Dataadapter, code 2, didn't used neither. Can anyone please help me explain what is the differences and advatages/disadvantages on both programs..thankz
code1
//create connection, dataset, dataadapter
System.Data.SqlClient.SqlCon...
I'm writing a plug-in for another program that generates a fairly complex tree structure of objects. The users will need to export this data from the plug-in for analysis and reporting. I definitely want them to be able to export to an MS Access database as it would be the most accessible for them to create quick and clean reports. But I...
I'm working on a .NET program that executes arbitrary scripts against a database.
When a colleage started writing the database access code, he simply exposed one command object to the rest of the application which is re-used (setting CommandText/Type, calling ExecuteNonQuery() etc.) for each statement.
I imagine this is a big performan...
I'm taking another project currently, which is based on the ADO .NET DS, and I need to get into the topic as quick as possible.
What is the purpose of ADO .NET Data Services in simple words? What is the best resource explaining ADO .NET Data Services?
...
Hello everyone,
I have two databases called DB1 and DB2 on the same database server. I have Table1 in DB2 and Table2 in DB2. Currently, I am using insert into select * to transfer all data from Table2 into Table1 (Table1 is empty, my purpose is to make a copy of data from Table2 to Table1). The table structure is clustered ID column (of...
I am trying to write a local program management and install system for my home network, and i think i've got the technologies nailed down:
C#/.NET/WPF for the client
Lua for installation scripting support (through LuaInterface)
SQL Server Express for maintaining a database of programs
However i'm unsure what specifically i'll use to ...
Hi,
i am using ExecuteOracleNonQuery and getting rowid as output parameter.How can i optimize subsequent related queries by using rowid?
...
I have a DataTable that is filled in from an SQL query to a local database, but i don't know how to extract data from it.
Main method (in test program):
static void Main(string[] args)
{
string connectionString = "server=localhost\\SQLExpress;database=master;integrated Security=SSPI;";
DataTable table = new DataTable("allProgram...
I have an ADO.NET Data Service that exposes an Entity Framework data model (.edmx).
I need to allow / reject reads/writes to certain entities for certain users. I use Windows Authentication. All I could find is overriding the OnStartProcessingRequest :
protected override void OnStartProcessingRequest(ProcessRequestArgs args)
{
base...
Is it possible to have a DataServiceException pass along a list of errors to consumers?
Rather than just receive the standard Message, Stacktrace information I would also like to have a list of errors when various validations fail on a model.
I tried to set the DataServiceException's inner exception to FaultException.
[DataContract]
p...
I have a DataTable that I manually created and loaded with data using C#.
What would be the most efficient way to create a table in SQL Server 2005 that uses the columns and data in the DataTable?
...
Hi,
I have an existing web app that has a data layer and a bll that calls the data layer. The data layer is ado.net that calls stored procedures.
I created another project in vs.net for linq-to-sql, dragged all my tables over.
Would it be wise to just start using linq or should I spend the time and re-write all the db logic in linq ju...
Hi,
I have a plugin manager that launches a plugin which connects to a FoxPro
database through the ADO.NET OLE DB provider.
At one client site connections are opened and closed without any problems
but at another client site, it gets stuck in 'connection.Open();' and within
a couple of seconds over 1GB of memory is allocated.
With...
I decided not to use an orm and going to use straight ADO.NET for my project. I know I know its gonna take longer to program but I just want pages to load at high speeds even at peak time.
...
Hello everyone,
I am using VSTS 2008 + ADO.Net + C# + .Net 3.5 + SQL Server 2008. I am using ADO.Net at client side to connect to database server to execute a store procedure, then return result from the store procedure.
Here is my code. I have two issues about timeout,
If I do not explicitly set any timeout related settings, for the...
I have a SqlCommand which inserts a datetime into column using a SqlParameter. At present I use DateTime.Now as the value of this parameter.
I believe this will add the datetime on the user's PC which is not consistent.
How do I change this so the datetime of the database server is inserted?
EDIT:
I should have made it clear this wa...
I'm tring to insert some records into my Sqlite database using the Entity Framework. I do not have a problem connecting to the database or mapping to the database. At least, I don't think I do. When I call "SaveChanges" an exception is fired that states:
Unable to update the EntitySet 'RawReadings' because it has a DefiningQuery and ...
Based on a database myDB, I generate edmx for all table and compile the project. Then I create stored procedure myProc in myDB. Then I update the model by "Update Model from database" in the node Stored Procedure and add myProc. It is fine. Then "Create a function import" on myProc. It is fine. Then I compiled the project, it is fine.
...
Hello:
I have a table with an after update trigger in SQL 2005. If I update directly with SQL QUERY the trigger runs ok.
This table is connected using a dataset and tableadapter to a DXDBGrid (Dev. Express).
If the user updates the grid, the underlying data is updated, but the trigger is not launched.
I've a PK on table, auto-generat...