Questions tagged [dataadapter]

DataAdapter is a .Net framework class that facilitates communication between a DataTable and a database.

DataAdapter is a framework class that facilitates communication between a and a database.

434 questions
2
votes
1 answer

How Can I Expose Private Fields using a Partial Class in VB.NET?

This is my first post on Stack Overflow so please exuse (and feel free to point out) any n00b mistakes. I am trying to implement transactions across multiple TableAdapters in VB.NET (using Visual Studio 2010) by extending the partial class as…
Jens Ehrich
  • 573
  • 1
  • 6
  • 19
2
votes
0 answers

Insert ParentTable Id into child table using Scope_identity by using adapter in C#

I have a parent table ParentTable which has a primary key. I want to insert data into ParentTable and then use that primary key to insert rows into the child table ChildTable. Example ParentTable: Id ClassName ---------------- 1 MailClass 2 …
yash fale
  • 235
  • 1
  • 4
  • 19
2
votes
1 answer

WinForms. How to find TableAdapter and Fill DataTable at Design-Time

Data in standart DataGridView looks too empty and it is unclear how data look in customized, filled grid I'm going to extend grid to look more complex but the result it will be visible only at run-time, when it have data. So I want to fill…
DmitryB
  • 455
  • 1
  • 5
  • 18
2
votes
1 answer

Issues adding column from DGV to SQL server

I'm sorry if the title is a little vague but I wasn't sure how to put it in a short space. For context, I have a save button, which is when changes made are updated in the SQL server database. This works fine when adding rows, or changing values,…
2
votes
0 answers

DataAdapter .Update does not update back table

my problem is very common, but I have not found any solution. This is my code: public async Task RollbackQuery(ActionLog action) { var inputParameters = JsonConvert.DeserializeObject(action.Values); var data =…
2
votes
2 answers

Error handling with SqlBulkCopy - could it be any harder?

Running very low on ideas here. I've got a case where I'm using SqlBulkCopy to pump data into a DB, and about halfway through I run into different exceptions (primary key violations, index violations, etc). I've confirmed that the violations are in…
David Catriel
  • 365
  • 7
  • 15
2
votes
1 answer

Create a adapter without knowing the driver type

One of the great things with ADO.net is that you dont have to know which kind of connections/commands that you are using (interface based programming). You can use a connection to create a command, and command to create a reader. IDbConnectin con =…
jgauffin
  • 99,844
  • 45
  • 235
  • 372
2
votes
2 answers

dataadapter.update() does not save to database

The following code is not saving the changes from the dataset to the database via the dataadapter.update(). I display the data on a winform to text boxes. I have a save button that should save the changes made to the database. the changes are only…
Jason
  • 21
  • 2
2
votes
4 answers

Database concurrency issue in .NET application

If userA deleted OrderA while userB is modifying OrderA, then userB saves OrderA then there is no order in the database to be updated. My problem is there is no error! The SqlDataAdapter.Update succeeds and returns a "1" indicating a record was…
MC.
  • 363
  • 1
  • 6
2
votes
2 answers

What do these .NET auto-generated table adapter commands do? e.g. UPDATE/INSERT followed by a SELECT

I'm working with a legacy application which I'm trying to change so that it can work with SQL CE, whilst it was originally written against SQL Server. The problem I am getting now is that when I try to do dataAdapter.Update, SQL CE complains that it…
RickL
  • 2,811
  • 3
  • 22
  • 35
2
votes
3 answers

Filling a DataTable with two(or more) joined tables

I have two tables that I want to join and use to fill a data table, and I am having an issue with column name collision: ----------- ----------- | Parent | | Child | ----------- ----------- | ParentID| | ChildID | | Name | |…
normanthesquid
  • 690
  • 1
  • 6
  • 21
2
votes
1 answer

C#. Checking a SQL Data Adapter for certain values

I have a database table and I am querying this table to check if a value already exists (for a login application). I have a data adapter, but I do not know how to check if the data adapter contains the value I am looking for... Here is the…
user3008146
2
votes
1 answer

DataAdapter, which method to Update?

I am currently studying as web developer, and are learning ASP.NET WEBFORMS. I have a question regarding DataAdapter and Updating/Deleting a table. I wanna know which is the right way to do this. Lets say I have this method. The Update…
Sigils
  • 2,492
  • 8
  • 24
  • 36
2
votes
2 answers

OleDbDataAdapter.Fill(DataTable) not working with big xls file size

I'm trying to get a DataTable, reading a .xls file. If I run the below code with a .xls file with size 25kb, it works fine, but if I load a bigger size file (7,52MB), it doesn't work. string filenamePath =…
pasluc74669
  • 1,680
  • 2
  • 25
  • 53
2
votes
2 answers

Syntax error in FROM Clause Da.fill?

I'm Getting a syntax error in the form clause in this code, can anyone help? Thanks :) Dim sql As String Dim con As New OleDb.OleDbConnection Dim da As OleDb.OleDbDataAdapter …