ado.net

Inserting just a new record using DataSet (.net c# ado.net )

I've a form containing more than 200 text boxes in .NET desktop application. I want to insert them into their respective 4 tables of Database. Now how should I go about it using Dataset & DataAdapter to do this? I mean usually this will be the flow: Populate the DataSet using DataAdapter.Fill(Dataset,"DataTable"); manipuate the data o...

How to process SqlCommand result (rows) as they come?

How to process SqlCommand result (rows) as they come? In other words, I am trying to do exactly what Sql Management Studio 2005 does when executing a query with many thousand rows. To me, it looks like as soon as Sql has found the first result, it notify the UI and display the rows as they come... I suppose that it can be done asynchron...

Entity Framework with SQLite

I am trying to create entities out of a SQLite database. SQLite doesnt have foreign keys, therefore I cannot map associations between entities. Is there a way to map them somehow? ...

Entity Framework with XML file as the data source

Is there a way to somehow map an XML file to entities, so that I can use Entity Framework with XML file as the data source. XML file is very similar to a database anyway. ...

Using SqlDataAdapter to insert a row

Hello all, I want to insert a row into the Database using SqlDataAdapter. I've 2 tables (Custormers & Orders) in CustomerOrders database and has more than thousand records. I want to create a GUI (TextBoxes) for adding new customer & orders into the Database to their respective tables. How should I do it? I guess the method that is...

Deleting connection strings in a dataset

When I'm viewing the connection string options in the properties view of a TableAdapter, I get a list of options for connection strings. Our project has evolved in such a way that many of these options refer to databases that no longer exist on the server. Is there a way to delete these? Thanks. ...

How to bind Image field to PictureBox in VB.Net 2008

Hi all, I have a table with image field that I need to bind to System.Windows.Forms.PictureBox, and I need to Load new images o Overwrite existing images or delete the image int the field with ADO.NET dataset object. ...

Reading and navigating a xml dataset file

The xml dataset file after I add it to a dataset like this: <?xml version="1.0" standalone="yes"?> <root> <Email></Email> <FirstName></FirstName> <LastName></LastName> <Addresses> <item> <Address1></Address1> </item> <item> <Address1></Address1> </item> </Addresses> <Friends> <item> <Name></Name> <...

Does anyone have any performance metrics of ADO.NET connection pooling vs. the create-and-destroy method?

I'm using WCF, SQL Server and ADO.NET. I'm looking at two implementation options for the data access layer. The Enterprise Library that uses connection pooling A custom solution that does not use connection pooling. Every time the database is accessed a connection is created, used and then destroyed. Option 2 looks like this: using ...

SQL Server connection string Trusted_Connection=true issue

Hello everyone, I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to develop ASP.Net Web application. My question is, if I am using Trusted_Connection=true with SQL Server authentication mode (not Windows authentication mode, i.e. using sa account and password in connection string in web.config), I am wonderin...

SQL Server connection string Asynchronous Processing=true

Hello everyone, I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to develop ASP.Net Web application. My question is, if I am using Asynchronous Processing=true with SQL Server authentication mode (not Windows authentication mode, i.e. using sa account and password in connection string in web.config), I am won...

connection pool setting of SQL Server connection string

Hello everyone, I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to maintain a legacy ASP.Net Web application. Here is the connection string the legacy application is using (the legacy application is using SQL Server authentication mode), My question is, I think the connection string is wrong, 1. since the se...

how database connection pool impacts performance?

Hello everyone, I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to develop ASP.Net Web application. The ASP.Net Web application is database centric/driven. I want to know whether there are any performance reference data about what are the differences of performance when we turn on/off thread pool setting in A...

Client side ADO.NET call fails to fill Dataset

I have a ASP.NET web page that needs to make a SQL Server call from the client side in a script sectipn of my aspx file. I'm calling a stored proc which takes one parm. This sp works fine in SQL Server Management Studio returning records as expected. When I try to fill a dataset from a call to this sp the ds gets filled with zero records...

Is it possible to access Excel file through ADO.NET that does NOT have a Header Row?

I have a formated Excel file, over which I do not have control, and I need to read the information contained in it. The problem with the file is that the first few rows contain formated information and I can not modify that file nor I can not ask for a format change. Is it possible then, to read such a file through ADO.Net? Thanks in ...

Access to the windows registry using ADO .Net

Exist any ADO.NET Provider for access to the windows registry? Or rather you can use ADO to connect to the windows registry? Thanks in advance. ...

ADO.NET and Open Office Base

Can you help me create the connection string to connect the ADO.net to Open Office Base, is there any Open Office additional ODBC driver? ...

Problem with inserting a new row into multipleTables or editing a row using SqlDataAdapter

Hello, I've to insert a new Row(user) into the Database using SqlDataAdapter. I also have to edit any desired row (whose PID is given). Problem is that both of them are not working. I've Created an Array of selectQuries[] with quries of the form for INSERT: "SELECT X,Y,Z FROM TAB1 WHERE 0=1". for Editing: "SELECT X,Y,Z FROM TAB1 WHER...

What ADO.NET book would you suggest?

For now I know SQL and want to write a database program in C#. I tried to read MSDN but it is too difficult for me. I need a book which can explain how ADO.NET works and give some useful examples. I'm not pro in C# also. P.S. It would be great if the version of ADO.NET explained in this book is 3.5. ...

How do you determine the recommended ADO.NET Batch Size in the Real World?

NOTE: I'm not looking for the answer from MSDN. How have you gone about determining the proper ADO.NET batch size value for your given database / application? What factors led to your decision and what experience can you share? Using Fluent NHibernate, I'm currently using something like: var sessionFactory = Fluently.Configure().Data...