473,387 Members | 1,455 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,387 software developers and data experts.

C# - Windows Application - save a datatable to a new table

pod
298 100+
Hello
Everyday I run a complex query from the corporate database (Oracle), I then set a datatable's datasource with this recordset.

What I want is to be able to save this daily datatable/recordset in a new table in my database(MS Access) without having to know the table's schema. Is this possible?

Thanks,


P :oD
Nov 26 '07 #1
2 2203
Shashi Sadasivan
1,435 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. Insert into newTable
  2. select * from baseTable
I think thats how the code goes.

However the order of the values expected will be according to the schema, and obviously an int cannot be written over by a varchar.

Do you want to create a new table and then insert the values into it?
Nov 26 '07 #2
pod
298 100+
Expand|Select|Wrap|Line Numbers
  1. Insert into newTable
  2. select * from baseTable
I think thats how the code goes.

However the order of the values expected will be according to the schema, and obviously an int cannot be written over by a varchar.

Do you want to create a new table and then insert the values into it?
That is exactly what I want to do. I thought that there could be a single command like ".CreateTableFromDatatable"

Correct me if I'm wrong, but I think this SELECT/INTO is OK only when working from the same database. What I have is a datatable created from an Oracle database query ... and I want to create a new table in my MS Access Database.

I can do it the long way, get the schema, create the table, insert data row by row... I was hoping that this great .NET FRAMEWORK would have had something already built-in... and that is what I am searching... I am not the only one, I'm sure
Nov 27 '07 #3

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

Similar topics

2
by: Garry Freemyer | last post by:
I wrote a screensaver, via Visual Studio 2003 in C# and I decided a wiser choice for me was to use an xml file to save my configs. Btw: I wonder if this is why every bit of documentation I've found...
10
by: Saso Zagoranski | last post by:
hi, this is not actually a C# problem but since this is the only newsgroup I follow I decided to post my question here (please tell me where to post this next time if you think this post...
8
by: Inigo Jimenez | last post by:
I have an ASP .net web application installed in a Windows 2003 server. This web application has a webform that has a Datagrid. This Datagrid is filled with the data of a SQL table. I have a...
6
by: Fred Morrison | last post by:
1. No Columns collection. 2. No ability to easily synchronize the underlying DataTable of a DataGrid when a row is deleted in the Grid. Once you sort (via the column headers) all bets are off as...
1
by: John | last post by:
Hi, I have a datatable object in memory, the datasource is not from SQL server. I want to save this datatable into SQL server 2000, what is the best way to do it? The only way I know is to...
1
by: seanmle | last post by:
I want to build a windows application that has a datagrid filled with data. When a person modifies information on a single cell, it updates the database without the user having to click on a save...
10
by: AG | last post by:
I am trying to use a ReportViewer control in a VS 2005 web application project (not Website project). When I try to create a new report (local), I can't seem to find any method to create a...
2
by: remya1000 | last post by:
i'm using VB.NET. and its a windows application. in my program i need to display a table in datagrid. so i created the table using DataTable and i'm calling that dataTable to dataGrid. and its...
1
pod
by: pod | last post by:
Hello Has anyone ever save a datatable to a database new table? If so, could you help me out and show me some sample code? Thanks Perry
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: 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...

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.