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
3
votes
1 answer

DataTable.Load is slower than IDataAdapter.Fill?

I am using the following code (Variant DataReader): public DataTable dtFromDataReader(list lstStrings) { OleDBConn_.Open(); using (OleDbCommand cmd = new OleDbCommand()) { DataTable dt = new DataTable(); …
jaufer.k
  • 90
  • 1
  • 7
3
votes
2 answers

.NET DataSet.HasChanges is incorrectly false

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…
G Berdal
  • 1,134
  • 3
  • 14
  • 28
3
votes
1 answer

System.Net.Sockets.SocketException when trying to fill DataTable with TdDataAdapter.Fill() (Teradata DataAdapter)

I've seen other people reporting the System.Net.Sockets.SocketException exception, but they largely involve web services. We're not calling any web services. In fact, this ASP.NET app is a single-tier app with the UI and data layer contained in a…
oscilatingcretin
  • 10,457
  • 39
  • 119
  • 206
2
votes
2 answers

Updating MS Access Database from Datagridview

I am trying to update an ms access database from a datagridview. The datagridview is populated on a button click and the database is updated when any cell is modified. The code example I have been using populates on form load and uses the…
Peter Roche
  • 335
  • 2
  • 6
  • 18
2
votes
1 answer

Getting information about DataRelations in a DataSet

Using FillSchema-method of the data adapter I obtain the table structure using (SqlConnection sqlConn = new SqlConnection(connectionString)) { var dataAdapter = new SqlDataAdapter(); var dataSet = new DataSet(); …
alex555
  • 1,676
  • 4
  • 27
  • 45
2
votes
2 answers

H2, DBDataAdapter, Locale property, column names and case sensitivity (collation)

Our application uses H2Sharp to access a H2 database from C# (Framework v4). H2Sharp inherits DBDataAdapter and implements IDbDataAdapter. As such, what I am asking about most likely applies to SqlDataAdapter, but I wanted to clarify the environment…
alokoko
  • 1,405
  • 4
  • 21
  • 35
2
votes
1 answer

What to look for when setting UpdateBatchSize

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…
hacker
  • 1,115
  • 1
  • 15
  • 28
2
votes
2 answers

How I can save the data from GridView to the database?

I am developing an ASP.Net C# Web Application that contains a GridView to display the records of a certain table from my database which I use ODBC Connection to connect to it and a DataSet to save data in it and edit it then I should save data to…
TopDeveloper
  • 542
  • 2
  • 14
  • 43
2
votes
1 answer

How to fill a dataset with 3 different adapters in Vb.net?

Aim to Achieve : I want to have 3 different dataTables from 3 different SQL queries from 3 different places into 1 single DataSet which I will have to return form my function. I have : Private Function getDataSet() Dim ad1,ad2,ad3 As Object …
Yugal Jindle
  • 44,057
  • 43
  • 129
  • 197
2
votes
1 answer

Dynamic query in a stored procedure not returning value as DataSet/DataTable in ASP.Net Core 2.2

I have a stored procedure which returns me a dynamic table as a result. SQL code credit from this answer create table temp ( date datetime, category varchar(3), amount money ) insert into temp values ('1/1/2012', 'ABC', 1000.00) insert…
TheFallenOne
  • 1,598
  • 2
  • 23
  • 57
2
votes
2 answers

c# validating login with sql database

protected void btnLogin_Click(object sender, EventArgs e) { string EmailAddr = ""; string Password = ""; string strConn = ConfigurationManager.ConnectionStrings["EPortfolioConnectionString"].ToString(); SqlConnection conn = new…
Kkk
  • 21
  • 1
  • 2
2
votes
0 answers

Can not read connection string from Settings.settings file

I have created application in Visual Studio 2013. For connection database and reading data i am using dataset which read connection string from Settings.settings file. Everything working in visual studio 2013. But when i opened this project in…
2
votes
2 answers

Does DataAdapter use facade pattern or Adapter pattern.

When I see Update(), Fill() methods of DataAdapter object, I always think whether DataAdapter uses Facade Pattern? It looks like behind the scenes it will create Command object, Connection object and execute it for us. Or DataAdapter uses Adapter…
Krirk
  • 1,466
  • 2
  • 10
  • 10
2
votes
1 answer

How could I pass parameter to sqldataadapter?

I have tried to pass parameter a value, but what it returns is nothing. If I use a simple sql command without parameter I can retrieve all the data from my database. Here is my code: Public Shared Function RetrieveData() As DataTable …
Sophart
  • 67
  • 1
  • 10
2
votes
3 answers

OracleDataAdapter, Fill method hangs, how do I handle connection terminations/drop offs/cut outs?

I have a C# program that connects to a remote server to query data. The data is quite big so the query takes about 2 mins to finish. During this 2 min window, the internet went down. This resulted in the job being unable to finish with the program…
furansu
  • 43
  • 1
  • 6