what is the difference between LINQ and ADO.net
what is the difference between LINQ and ADO.net ...
what is the difference between LINQ and ADO.net ...
If I'm letting Visual Studio take care of adding an SQL Server database to an existing project, it adds the connection string to app.config. How can I use use THAT connection string to make my own connections and datasets? ...
Hello all, I'm using Enterprise library, but the idea is the same. I have a SqlStringCommand and the sql is constructed using StringBuilder in the forms of "insert into table (column1, column2, column3) values (@param1-X, @param2-X, @parm3-X)"+" " where "X" represents a "for loop" about 700 rows StringBuilder sb = new StringBuild...
ok now i am using the SQL database to get the values from different tables... so i make the connection and get the values like this: DataTable dt = new DataTable(); SqlConnection connection = new SqlConnection(); connection.ConnectionString = ConfigurationManager.ConnectionStrings["XYZConnectionString"].Connectio...
I'm interested in making a generic tool to log database calls in ASP.Net by page so I need the stack trace as well. Idea is similar to http://l2sprof.com/, but for straight ADO.Net. Essentially I want to make a tool I can add to any project that can generate some statistics by page/class of # of calls and what calls are made so I can g...
This one has me stumped. Here are the relative bits of code: public AgencyDetails(Guid AgencyId) { try { evgStoredProcedure Procedure = new evgStoredProcedure(); Hashtable commandParameters = new Hashtable(); commandParameters.Add("@AgencyId", AgencyId); SqlDataRea...
I'm writing a fairly uncomplicated program which can "connect" to several different types of data sources including text files and various databases. I've decided to implement each of these connection types as a class inherited from an interface I called iConnection. So, for example, I have TextConnection, MySQLConnection, &c... as class...
Is there a way to require an API key in the URL / or some other way of passing the service a private key in order to grant access to the data? I have this right now... using System; using System.Data.Services; using System.Data.Services.Common; using System.Collections.Generic; using System.Linq; using System.ServiceModel.Web; using Nu...
Can any one help me why this error occurs when i update using sqlDataadapter with join query Dynamic SQL generation is not supported against multiple base tables. ...
I have some MS Access experience, and had a class on console c++ apps, now I am trying to develop my first program. It's a little C# db app. I have the db tables and columns planned and keyed into VS, but that's where I'm stuck. I'm needing C#/VS tutorials that will guide me on configuring relationships, datatyping, etc, on the db so I...
I have three columns in my data table. 1) ProductID 2) ProductParentID 3) ProductTotal ProductID and ProductParentID are self refrencing columns where i can set parent child relationship and get child rows based on my relationship. Let us say i have following data Product1 Product11 Product12 Product13 Product1...
Hi guys, I just kind of confused as to why I can't get to sync all expected data in one sync session. When I try to sync to the central database through WCF services, I only get partial sync, then there are still some data left that were not synched. So I still need to resync. Is there an explanation why I can't get all expected data i...
I want to get some trick for this problem. I have my table like this Product (uuid, Name) and one datagridview to display this information ( dataGridView.DataSouce = Products which is assign on runtime) My problem is that I want to have "No" column on dataGridView which will show like below No | Name 1 | ...
It's possible to call .NET from MATLAB, so I thought I would try to use ADO.NET to connect to a database. I seem to have hit a blocking problem - anytime you try and create a Command object, it throws an error. You can try this yourself: >> NET.addAssembly('System.Data'); >> sqlconn = System.Data.SqlClient.SqlConnection(); >> sqlconn....
Hi, QUESTION: How can I handle potential contention between two separate threads accessing the same Sqlite database? BACKGROUND: I have a C# Winforms application that uses Sqlite via ADO.net. I do have a backgroundworker thread in the winforms application. I have noticed that I can get an exception when both the main thread, and the...
Hello I have some data in a Oracle database table(around 4 million records) which i want to transform and store in a MSSQL database using ADO.NET. So far i used (for much smaller tables) a DataAdapter to read the data out of the Oracle DataBase and add the DataTable to a DataSet for further processing. When i tried this with my huge t...
I have an existing solution that includes Sync Services between an SQL2005 server and SQL/CE on a mobile device. The current implementation consists of additional columns in each of the server tables for date created and date updated (both datetime) supported by tombstone tables containing the primary key and a datetime to manage the de...
Usually i write my where statements as WHERE key=@0 then add a param. Now i would like the user to specific a few letters such as 'oat' and would like to stick wildcards around it %oat% which matches 'coating'. So how do i write the query so wildcards are around the user input (the 'seachword'). Now lets take it a step further. I would ...
I use Oracle's specific data provider (11g), not the Microsoft provider that is being discontinued. The thing I've found about ODP.NET is how picky it is with data types. Where JDBC and other ADO providers just convert and make things work, ODP.NET will throw an invalid cast exception unless you get it exactly right. Consider this code:...
Hi all I'm using an ADO.NET Entity Model which I'm trying to query using LINQ. The problem I'm having is that I can't specify the where clause as I'd like. For instance, consider the following query: AccountsDM db = new AccountsDM(ConfigurationManager.ConnectionStrings["PrimaryEF"].ConnectionString); var accounts = from a in db.Accoun...