ado.net

Rules of thumbs for writing "queries" using ADO.NET Entity Framework

I’m currently working on a prototype of a medium size web application, and I thought that it would be good to also experiment with Entity Framework. The problem is that the major part of the application is not the data layer and logic, and so that I don't have much time to play with Entity Framework. On the other hand, the database schem...

Webservice/Entity objects or datareader for my winform app?

Is it best to use a webservice to pull data from a database and load it into my entity object, then send the entity objects to my winform app? Will this make any performance difference over going direct to the database and pulling a datareader back to the winform client, then loading the entities on the client? Some of the users will b...

How to query Excel data which is in memory using OLEDB?

I have a file upload control on a web page. Users will upload the excel files and in my code, first I save the excel file to the disk and then open it with OLEDB connection and do my stuff. My question is: Is there anyway to avoid saving this file to disk? ...

ADO.NET Framework change tracking

Hi, i just wanted to ask if there is a way the reject all changes made to a ADO.NET Framework model with its relations? Auditing in Entity Framework describes a way the restore the original value of a single entity. But is this possible for all unsaved changes in the whole database? ...

Using ADO.NET to access Sybase database

I have three stored procedures that I can use to retrieve data from Sybase database. Two of these three stored procedures have output parameters. These two stored procedures do not process and return values in the output parameters. The code for the stored procedure that executes properly by returning values in a datareader is as follows...

any limit of SQL Server connection count?

Hello everyone, I am using SQL Server 2008 Enterprise + C# + ADO.Net + .Net 3.5. I am using sp_who2 or sys.dm_exec_connections to find active connections numbers (let me know if my method to find active connection numbers are wrong). For some heavy database consumer application, I can find even active connection count > 1000. I am wond...

connection leak issue in SQL Server

Hello everyone, I am using SQL Server 2008 Enterprise + C# + ADO.Net + .Net 3.5. I am using connection pool at ADO.Net client side (the default behavior of ADO.Net). I am using sp_who2 or sys.dm_exec_connections to find active connections numbers (let me know if my method to find active connection numbers are wrong). If each time after...

Warning in XML Editor on Typed DataSet ".XSC" File

It all about a typed Dataset... The 'urn:schemas-microsoft-com:xml-msdatasource:DataSetUISetting' element is not declared <?xml version="1.0" encoding="utf-8"?> <!--<autogenerated> This code was generated by a tool. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. </autogener...

ADO.NET & Oracle: Getting Line Number Info When Script Execution Fails

I've been working for some time on an application written entirely in C# that targets Oracle databases. The idea is to provide everything that Oracle SQL Developer does, but faster, with a smaller memory footprint. So far, I'd say I'm 90% there. But I've got one small problem, and it's annoying the $#@!$@ out of me! I'm using ADO.NET ...

Using ADO.NET Entity Data Model, how do I pass (or set) the connection string password?

Hello SO: I am working with the ADO.NET Entity Data Model for this side project I am working on. Typically I would include the whole connection string (user and password) inside the web.config, but I was feeling frisky this morning so I decided to exclude the password from the connection string. Unfortunately for me, I cannot seem to fi...

Connection pooling in SQL SERVER (express)- recommended amount ?

Hi there, is there a recommended amount of connections fro each application i have for use with connection pooling.., my apps are using asp.net and c# against sql express on the "same" server. I have 5 applications running, they are not used intensively, all connections are opened and closed.. So i was thinking of setting each app to ...

Ado.net entity .include() method not working

I've got this function public static AdoEntity.Inspector GetInspectorWithInclude(int id, List<string> properties) { using (var context = new Inspection09Entities()) { var query = context.Inspector; if (properties != null) { foreach (var prop in properties) ...

How to SELECT data from SQL Server using .Net 2.0 -- as simple as possible.

Easy question: I have an app that needs to make a half dozen SELECT requests to SQL Server 2005 and write the results to a flat file. That's it. If I could use .Net 3.5, I'd create a LINQ-To-SQL model, write the LINQ expressions and be done in an hour. What is the next best approach given that I can't use .Net 3.0 or 3.5? Are ADO.NE...

executereader never return

i am using mysql via devart dotconnect. above code is part of the multithreaded class. public void DoQuery(ref Devart.Data.MySql.MySqlDataReader Dr, string QryStr) { lock (locker) { //Program.MyMutex.WaitOne(); Devart.Data.MySql.MySqlCommand Command = new Devart.Data.MySql....

Beginner: How do datalists work in asp.net/vb.net?

I'm very new to asp.net and I have a general question about datalists. I was able to get this to work, but I don't understand how really. I think I need someone to give me the "theory" on this. So first I connect to the database: Dim MyConnection As SqlConnection MyConnection = New SqlConnection("myconnectionstring=workingfine") Dim DS...

Use of SqlCommandBuilder in ASP.NET

Hi, I have used the following code to add the feedback entered to the web form into a database. The code works fine. But when I try to deleted thi statement SqlCommandBuilder objcb = new SqlCommandBuilder(objDa); I am getting an error I mean it is executing the else part. Can any one tell me what is the use of SqlCommandBuilder? ...

SqlConnection.ClearAllPools issue

Hello everyone, I am using VSTS 2008 + .Net 3.5 + C# + ADO.Net + SQL Server 2008 Enterprise. I am learning http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.clearallpools.aspx about SqlConnection.ClearAllPools method. I want to know the behavior of this method is, if any connections from connection pool is idle...

How to decide which ADO.NET method to use?

I'm pretty new to ADO.NET, and I'm a little confused and frustrated by the number of options available for manipulating data. There's regular ADO.NET, LINQ to SQL, Entity Framework. Right now I'm developing an IRC client and using ADO.NET (and the SQLite provider) to store settings like networks, servers, favorite channels, etc. How ca...

Create new SQLCommand's or reuse the same one

I need to send a list of commands to SQL 2008 using ADO.NET, to be executed one after the other. Should I create a new SQLCommand for each SQL that I'm sending? Or reuse the same SQLCommand and just change the CommandText property? Thanks, Nestor ...

Using Access DB (.mdb) with ADODB in C# (ASP.MVC) like with Classic ASP

Hi, I used to work a lot with classic asp. I'm currently trying the ASP.NET MVC and like it so far, but I'm missing the simple usage of the ADODB Connection. I was searching the web, for any simple and clear solution like the code below, used on classic ASP, but everything I found was way more complicated and/or not with ADODB on C#. I ...