473,811 Members | 2,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving a data table to a MS Access database

Hi -

I've a data table that I want to save to an external Access database.

I'm interested in sample code that would perform this save.

Thanks, Mark
(VB.NET, .Net framework 1.0)
May 3 '06 #1
5 5824
Mark,

From where did you get your datatable?

You cannot create from a hand made datatable a database. This is maybe an
option for a next version from Visual Studio Net.

Cor

"Mark" <Ma**@discussio ns.microsoft.co m> schreef in bericht
news:0C******** *************** ***********@mic rosoft.com...
Hi -

I've a data table that I want to save to an external Access database.

I'm interested in sample code that would perform this save.

Thanks, Mark
(VB.NET, .Net framework 1.0)

May 3 '06 #2
Cor -

The program populates a datatable from a connection to an Excel workbook.

It's in a loop, with each iteration the workbook is opened, calculates the
result, and the result is saved in a datatable residing in the VB program.

When the loop is done I want to save the datatable to an External Access
Database for use in other apps.

Thanks,
Mark

"Cor Ligthert [MVP]" wrote:
Mark,

From where did you get your datatable?

You cannot create from a hand made datatable a database. This is maybe an
option for a next version from Visual Studio Net.

Cor

"Mark" <Ma**@discussio ns.microsoft.co m> schreef in bericht
news:0C******** *************** ***********@mic rosoft.com...
Hi -

I've a data table that I want to save to an external Access database.

I'm interested in sample code that would perform this save.

Thanks, Mark
(VB.NET, .Net framework 1.0)


May 3 '06 #3
You can issue DDL statements to Access like you would in SQL.

Take a look at
http://www.personal.kent.edu/~gthomas/sql/sqldoc.htm

"Mark" <Ma**@discussio ns.microsoft.co m> wrote in message
news:EF******** *************** ***********@mic rosoft.com...
Cor -

The program populates a datatable from a connection to an Excel workbook.

It's in a loop, with each iteration the workbook is opened, calculates the
result, and the result is saved in a datatable residing in the VB program.

When the loop is done I want to save the datatable to an External Access
Database for use in other apps.

Thanks,
Mark

"Cor Ligthert [MVP]" wrote:
Mark,

From where did you get your datatable?

You cannot create from a hand made datatable a database. This is maybe an
option for a next version from Visual Studio Net.

Cor

"Mark" <Ma**@discussio ns.microsoft.co m> schreef in bericht
news:0C******** *************** ***********@mic rosoft.com...
> Hi -
>
> I've a data table that I want to save to an external Access database.
>
> I'm interested in sample code that would perform this save.
>
> Thanks, Mark
> (VB.NET, .Net framework 1.0)


May 3 '06 #4
Why don't you create your DataBase with the appropriate blank table
containing all the fields you want. You can then fill a dataset with the
blank datatable from the database, update your dataset then when finished,
update the datatable in the database.
--
Dennis in Houston
"Mark" wrote:
Cor -

The program populates a datatable from a connection to an Excel workbook.

It's in a loop, with each iteration the workbook is opened, calculates the
result, and the result is saved in a datatable residing in the VB program.

When the loop is done I want to save the datatable to an External Access
Database for use in other apps.

Thanks,
Mark

"Cor Ligthert [MVP]" wrote:
Mark,

From where did you get your datatable?

You cannot create from a hand made datatable a database. This is maybe an
option for a next version from Visual Studio Net.

Cor

"Mark" <Ma**@discussio ns.microsoft.co m> schreef in bericht
news:0C******** *************** ***********@mic rosoft.com...
Hi -

I've a data table that I want to save to an external Access database.

I'm interested in sample code that would perform this save.

Thanks, Mark
(VB.NET, .Net framework 1.0)


May 4 '06 #5
Mark,

This is a typical Paul Clement question, I thought that he has given answers
to do this direct instead of using OleDb.

Maybe he will answer you direct maybe you can otherwise yourself what he has
written about this.

http://groups.google.com/groups/sear...el&qt_s=Search

Cor

"Mark" <Ma**@discussio ns.microsoft.co m> schreef in bericht
news:EF******** *************** ***********@mic rosoft.com...
Cor -

The program populates a datatable from a connection to an Excel workbook.

It's in a loop, with each iteration the workbook is opened, calculates the
result, and the result is saved in a datatable residing in the VB program.

When the loop is done I want to save the datatable to an External Access
Database for use in other apps.

Thanks,
Mark

"Cor Ligthert [MVP]" wrote:
Mark,

From where did you get your datatable?

You cannot create from a hand made datatable a database. This is maybe an
option for a next version from Visual Studio Net.

Cor

"Mark" <Ma**@discussio ns.microsoft.co m> schreef in bericht
news:0C******** *************** ***********@mic rosoft.com...
> Hi -
>
> I've a data table that I want to save to an external Access database.
>
> I'm interested in sample code that would perform this save.
>
> Thanks, Mark
> (VB.NET, .Net framework 1.0)


May 4 '06 #6

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

Similar topics

6
1761
by: S. Graefner | last post by:
Hello Folks, I'm a Relitive newbie to the blood sport of MS ACCESS. I have designed and built a database with multiple, Related, tables. The db works well, more by good luck then good planing I expect. The problem I'm faced with is being able to save certian fields from the various tables to a floppy and then Download/Import them to an exact copy of the database on another computer located elsewhere. This has to be done with a floppy or...
13
7417
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've created forms for both those tables, and inserted the child table form into the master table form as a subform. It works just as it is supposed to, in that I can create a new master record, and then add detail records.
4
6726
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my code ?? thank you Pedro Leite From Portugal ------------------------------------
1
2599
by: Magnus | last post by:
I'm testing walkthrough saving data to a Database (Multiple Tables). http://msdn2.microsoft.com/en-us/library/4esb49b4(VS.80).aspx In the famous Customer/Order example, I'm getting referential integrity problems "The INSERT statement conflicted with the FOREIGN KEY constraint..." if the identity/primary key column is "out of sync" with the identity value in the database. I can easily acheive this f.ex. by pressing add new record,...
2
2228
by: jessDMiller | last post by:
I have no clue why the data from the form isn't saving into the database. What am I doing wrong? addAnnounce.php: <td align=top> <form action="index2.php" method="post">Heading:<br /><textarea name="heading" cols="50" rows="10"></textarea><br /><br />Announcement:<br /> <textarea name="announce" cols="50" rows="10"></textarea> <br /><br />Date:<br /><textarea name="date" cols="50" rows="10"></textarea><br /><br /><input...
3
1777
by: Nathan Guill | last post by:
I have an interface that works with an Access back-end. I would like to store and/or load user defined query strings per each user (i.e. no user can access another's queries). The idea I had was a "table" stored with the C# front-end (not in the Access database), but don't know if this is even possible. If it is, can someone let me know how? Otherwise, how do other people handle storing and loading query strings for possible later use?
4
6812
by: SilentThunderer | last post by:
Hey folks, Let me start out by letting you know what I'm working with. I'm building an application in VB 2005 that is basically a userform that employees can use to "Clock in". The form allows the employee to enter their UserID and select "Login" or "Logout" and then click a submit. When the submit button is clicked, I want the application to dum the NT Userename, UserID, status (Login or Logout) and a date/time stamp into an MS Access...
1
2075
by: nmrpa91290 | last post by:
I have a vb 2005 program that I am writing. It is just a form with a datagridview, textbox, and import command button. The code looks like this: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'TestDbDataSet.TestTable' table. You can move, or remove it, as needed. Me.TestTableTableAdapter.Fill(Me.TestDbDataSet.TestTable)
4
2403
by: corey11 | last post by:
I'm a very low-level developer with limited VB knowledge but nonetheless was able to put together a very user-friendly and extremely helpful Access 97 database for my company some 10 years back. We use the database for inventory, job costing, employee records, timecard recording, nearly everything except the hard core accounting. The database is shared by 20 users over a network. Every 3 or 4 years I archive and purge the data to keep the...
0
9727
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10647
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10386
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.