Solved

How to save the Dataset to a new file using today's Date as filename?

Posted on 2004-10-14
6
171 Views
Last Modified: 2010-04-23
Hi,

I am using Provider=Microsoft.Jet.OLEDB.4.0 connection to load and save my database to file.

I have created datatable in a dataset. and I would like to save this datatable/dataset to a new file created using todays date as the filename.

e.g. checks if the file exist, then otherwise create a new file called "14-07-2004.mdb"

I guess the checking if the file exist is easy, but I don't how to create new file in ADO.net and using the date as a filename.

Any help would be appreciate!

many many thanks.
0
Comment
Question by:staines
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 10

Expert Comment

by:Hans Langer
ID: 12314150
Hi !
You want to create a file from de dataset ?, with what format ?
0
 
LVL 9

Expert Comment

by:checoo
ID: 12316230
if you want to save it as XML then its easy

datset.getXML(filename)
0
 

Author Comment

by:staines
ID: 12317244
I mention as above, i want to create a database file using the data as "15-10-2004.mdb"

a .mdb file...

thanks.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 12317788
Hi staines,

look here for a
0
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 250 total points
ID: 12317792
0
 
LVL 10

Expert Comment

by:Hans Langer
ID: 12318253
nice article.

now, just change:

 cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" & _
                 "Data Source=D:\AccessDB\NewMDB.mdb;" & _
                 "Jet OLEDB:Engine Type=5")

to

 cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" & _
                 "Data Source=D:\AccessDB\"  & Now.Date.ToString("dd-MM-yyyy") & ".mdb;" & _
                 "Jet OLEDB:Engine Type=5")
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question