For example if I run the following query:
select * from table1
select * from table2
And run it with a DB adapter (C#) I get a dataset with two tables.
How can I define the names for the result tables in SQL?
I can only do this inside the SQL. I don't have access to the c# code.
...
I have a batch process that reads data from multiple tables into a dataset based on a common key. I then build a second dataset of the destination data querying on the same key.
At this point I have two Datasets that are structurally identical (from a table/column layout perspective). I then have a process that adds any row that exis...
I have a situation where I have a bunch of SQL Update commands that all need to be executed. I know that DataSets can do batch updates, but the only way I've been able to accomplish it is to load the whole table into a dataset first. What if I want to only update a subset of the records in a table?
...
Which would be quicker.
1) Looping a datareader and creating a custom rows and columns based populated datatable
2) Or creating a dataAdapter object and just (.Fill)ing a datatable.
Does the performance of a datareader still hold true upon dynamic creation of a datatable?
...
When i see Update(),Fill() method of DataAdapter object I always think Is DataAdapter use facade pattern ?
It looks like behind the scenes It will create Command object, Connection object and execute it for us.
Or DataAdapter use Adapter pattern because it is adapter between Dataset and Comamand object ,Connection object ?
...
My project that I am working on is almost finished. I am loading a .MDB file, displaying the contents on a DataGrid and attempting to get those changes on the DataGrid and save them back into the .MDB file. I am also going to create a function that allows me to take the tables from one .MDB file and save it to another .MDB file. Of cours...
I have seen many references stating that TableAdapters are weak and silly, and that any real dev would use DataAdapters. I don't know if that is true or not, but I am exploring the matter, and stressing out over how bad this whole 'DataAdapter/TableAdapter against a Typed DataSets' smells.
Let me try to explain...
Suppose I have my Typ...
When I built my .xsd, I had to choose the columns for each table, and it made a schema for the tables, right? So how can I get that Select string to use as a base Select command for new instances of dataadapters, and then just append a Where and OrderBy clause to it as needed?
That would keep me from having to keep each DataAdapter's ...
this code never fills the grid view I know that somthing is wrong here the code
Imports System.Data
Imports ZidduDataSetTableAdapters
Partial Class _Default
Inherits System.Web.UI.Page
Dim filesAdp As New FilesTableAdapter
Dim filestable As New ZidduDataSet.FilesDataTable
Protected Sub btnfill_Click(ByVal sender As Objec...
i make the adapter.insert and the adapter.delete and both work good but not with the adapter.delete even i put only on argument here the code
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
usersAdp.Fill(userstable)
usersAdp.Update(txtid.Text, Me.txtname.Text, Me.txt...
I have a .NET application that is merging two datatables with a lot of rows (10,000+). There is a good chance of having a large number of update/inserts to perform to the SQL table when using the DataAdapter.Update command.
Right now, I have the Adapter UpdateBatchSize property set to 200. VS warns against setting this value too high ...
Hello, I have a SqlDataAdapter that is being populated with 21 rows of data (4 columns). The sproc that drives it returns in a couple seconds in SQL Mgmt Studio, but the .Fill() takes 5 minutes.
ArrayList ret = new ArrayList();
SqlDataAdapter da = null;
SqlCommand cmd = null;
cmd = base.GetStoredProc("usp_dsp_Stuf...
Hello all,
I have a strongly typed DataTable created with the VS2005/VS2008 DataSet designer.
The table has a Primary Key column that is a guid, which gets populated by SQL server. The problem is when I want add a row (or multiple rows) to my DataTable and then call the DataAdapter.Update method (passing in the DataTable). When DataA...
I'm using SqlDataAdapter.Update(DataTable) to throw a table at the database, but the SqlDataAdapter ignores my InsertCommand to write its own, which only sends the primary key and all the rows that can be null if they want. How do I get it to behave?
I step through the code before and after I call Update(). Before, it's my InsertCommand...
Hello,
I'm attempting to pull some data from a SQLite database so that I can populate a GridView in my GUI: here is the code that returns the DataTable:
DataTable table = new DataTable();
SQLiteDataAdapter adapter = new SQLiteDataAdapter(this.command.CommandText, this.connection);
adapter.Fill(table);
return table;
For some reason a...
We have a SQL Server stored procedure that runs fine in SQL Manager directly, does a rather large calculation but only takes 50-10 seconds max to run.
However when we call this from the .NET app via a data adapter it times out. The timeout however happens before the timeout period should, we set it to 60 seconds and it still times out ...
Edit: any comments whether you think this is a .NET bug or not would be appreciated.
I have a bug which I've managed to simplify to the following scenario:
I have a DataTable where the primary keys must be kept consecutive, e.g. if you insert a row between other rows, you must first increment the ID of the succeeding rows to make space...
Sorry for the probably stupid question. Since I found nothing about it on the internets, its probably totally obvious and I'm just to blind to see?!
I'm trying to update a table in a database from a dataset via DataAdapter.Update(dataset)
But there is no possiblity to set the connection, the DA should use.
Where does the DA know how t...
I'm using the DataSet/DataTable/DataAdapter architecture to mediate between the database and my model objects, which have their own backing (they aren't backed by a DataRow). I've got a DataAdapter with AcceptChangesDuringFill = False, AcceptChangesDuringUpdate = False, and FillLoadOption = OverwriteChanges. Here's my understanding of th...
Hi guys,
Has anybody come across ds.hasChanges() being false despite that the ds clearly has the changes while you check it at a breakpoint?
I've been looking at it for quite a while and I can't see what is wrong...
// connectionstring and command has been set
DataSet ds = new DataSet();
BindingSource myBindingSource = new BindingSourc...