473,382 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

DataSet or DataTable Update

Hi All,

Language:-VB .NET

Hi i am using the following method to retrieve values from the database..

DSRs.Tables(0).Rows(AbsolutePosition).Item(sFieldN ame)
where DSRs =DataSet ,AbsoulutePosition is the record pos, sFiledName is the name of the column in databse..

Now the Problems is as follows:-

In the First method i am retrieving the data from the column as "EmpNAme".Suppose i get the result as David.. Now e.g. from the external source i modify that name to be "David1" .either manually from the database or from the Update statement executed directly in the databse..

Now without disconnectinog this dataset how do i update or refresh the DataSet or DataTable so that i can retrieve the updated valued. from the database.

Any help on this will be highly appreciated.

Thanks in Advancee,

Prashant Hirapara
Aug 4 '07 #1
4 1650
kenobewan
4,871 Expert 4TB
Have you tried refilling the dataset using the data adapter?
Aug 4 '07 #2
yes i have tried the following statement to fill the dataset

DARs.Dispose()
DARs = Me.OpenDataAdapter(sSelectString)
Me.FillDataSet(DARs, DSRs, "Temp")

Where DaRs is the Data Adapter,sSelectString is the sql statement,

DsRs is the dataset.

Thanks ,

Prashant Hirapara
Aug 5 '07 #3
kenobewan
4,871 Expert 4TB
And you do this after the update, refill your dataset?
Aug 6 '07 #4
And you do this after the update, refill your dataset?
HI Thanks a lot mod...it has worked fine.. but i was afraid on using that as i thought that on the large queries it is not a good idea to refill the whole dataset.. as we dont do in vb 6.

Thanks and Keep Helping,

Prashant Hirapara
Aug 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Bruce Stockwell | last post by:
the setup: Webservice/WinClient application/SQL server. VS.Net (visual basic) winform wizard creates a simple form with load cancel cancelall and datagrid bound to a simple Dataset with one...
4
by: Frnak McKenney | last post by:
I'm using an in-core DataSet as an image of my application's 'database' (a multi-table Access97 mdb file). Updates are made to the DataTables within the DataSet via forms with bound TextBoxes,...
15
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
9
by: jaYPee | last post by:
I have search a lot of thread in google newsgroup and read a lot of articles but still i don't know how to update the dataset that has 3 tables. my 3 tables looks like the 3 tables from...
14
by: Lars Netzel | last post by:
A little background: I use three Datagrids that are in a child parent relation. I Use Negative Autoincrement on the the DataTables and that's workning nice. My problem is when I Update these...
12
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they...
2
by: Scotty | last post by:
I get stuck to write an update, insert and delete command, i am looking for some help to start Whats the best way to update 2 tables toe the database (Access) below my code used to load my...
1
by: tshad | last post by:
Is there a way to update a DataSet Object? I have a Dataset Object (DataSetObj.Tables(0) - one table) that I read in from a .csv file. I normally do the following to get my data from the .csv:...
2
by: Mr. Arnold | last post by:
I am working a C# project that uses what's in the subject. I kind of have the basics down on reading the table data. I don't use the above methods of data access or persistence, but I am stuck...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.