473,398 Members | 2,125 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,398 software developers and data experts.

Update disconnected dataset

If I manually create my own dataset with no backing database, is it
possible to run an Update sql command on this dataset? What I would
like to do is this

Dim ds as New DataSet
Dim dr as DataRow

ds.Tables.Add("table1")
ds.Tables("table1").Columns.Add("column1")
dr = ds.Tables("table1").NewRow
dr("column1") = "Value1"
ds.Tables("table1").Rows.Add(dr)

'' HERE IS THE PROBLEM -- FAKE CODE AHEAD
ds.UpdateCommand = "Update table1 SET column1 = 'Value2'"
ds.Update()

Is there any way to do this? Everything I've seen involves using a
DataAdapter with an underlying connection to a database.
Jul 21 '05 #1
1 1282
Rob,

The XML dataset on disk is not a database and therefore not accessable with
SQL commands. A XML dataset is just a file, that can be saved and
transported for which is very much usable, however no database.

And therefore you can not access it using SQL statements. (The first thing
you would need for that is a connectionstring, and I never saw that).

Although all the things you want to do you can do, just write it back with a
ds.writexml(path) that new table should be in it

(What you want to do on the database does not go by the way, there is a lot
missing for that)

I hope this helps anyway?

Cor

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jason Shohet | last post by:
I have an asp.net app, and suddenly, I lose connection to the web server. I'd like a way -- if the update doesn't go thru, to 'cache' the changes to the dataset. Then the next time the user hits...
3
by: Simon | last post by:
Hi everyone, I have a small problem regarding a wizard that I'm making on my website. The wizard is obviously a series of pages that take values from the user. My question is: - Should I...
3
by: D. Shane Fowlkes | last post by:
I have a Datagrid which in theory, should allow you to edit and update the records. I've stripped my test page down so that it's only attempting to update one field - "description". Yet when I...
0
by: Vijay Balki | last post by:
I am fetching data in DataSet - myDataSet, from a remote database using a Web Service in my VB.NET client..Once I fetch it I store the data in XML file (myXMLFile) using the WriteXML method of the...
0
by: Manoj | last post by:
hi, I am running a long calculation process which get the data values from a dataset and update value at certain row in the same dataset. Now I am not sure to update DB ( Oracle ) do i need to...
1
by: Rob Gibbens | last post by:
If I manually create my own dataset with no backing database, is it possible to run an Update sql command on this dataset? What I would like to do is this Dim ds as New DataSet Dim dr as...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
2
by: chandu | last post by:
Hi Guys, i am beginer in the worls of Asp.net and C#.net I have one problem that I have stored my changes of data into dataset using disconnected dataset and after completion of all changes i...
3
by: G .Net | last post by:
Hi Everybody I was wondering if anybody could help me with something that has been bothering me for some time. Basically, it is a problem I encountered some time ago with DataSets. I found a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.