Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-10-14
6
Medium Priority
?
183 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
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 12317788
Hi staines,

look here for a
0
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 1000 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

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.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

916 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