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

Oracle ODT / ODAC create table

Hi,

Admitted I am a newbie to Oracle (databases in general) but now Ive
installed the Oracle DB v.10g and the ODAC development tools for
Microsoft Visual Studio 2005.

So, now i've found out, how to get data from a table. doing the
following:

Expand|Select|Wrap|Line Numbers
  1. string sql = "SELECT * from transactions";
  2. OracleCommand cmd = new OracleCommand(sql, oracleConnection);
  3. cmd.CommandType = CommandType.Text;
  4. dataAdapter = new OracleDataAdapter(cmd);
  5.  
  6. DataSet dataSet = new DataSet();
  7. dataAdapter.Fill(dataSet);
  8.  
  9. DataGridView grdTransactions.DataSource = dataSet.Tables[0];
  10.  
this seems to be a quite convenient way to get a representation of the
table (into a DataSet). And with a simple dataAdapter.Update(dataSet);
command I can also get new rows that were added to the table in the
dataSet to be stored in the Oracle database.
My questions now are the following:

1. How can I get only the representation of a table into the local
dataSet? (without fetching all the existing rows from the DB. after
all, I sometimes only want to store one row into the database. that's
it)
2. How can I create a Table programatically or execute any sql command
(e.g. DROP, CREATE, INSERT INTO) on the database? (so far I've only
found ways to execute a read/SELECT command for example with
dataAdapter.Fill(dataSet); or command.ExecuterReader(); )
3. Isn't it possible to just work with a object-based abstraction of
the database schema such as the DataSet class using that to add,
alter, delete tables and then send the dataSet to the database to be
stored exactly as it is?!?

as far as possible I want to keep away from SQL commands and rather
just use classes instead!

Thanks in advance.

Mar 15 '07 #1
0 2260

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

Similar topics

4
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
5
by: Madjid Nasiri | last post by:
Hi, I am basic in oracle. My Old programs write with Delphi and Databases: Access, Paradox, MySQL, Microsoft SQL. I write my code (SQL code) case-insensitivae, but now i need use oracle database....
133
by: jonathan | last post by:
hey all, I realize that this question might pop up from time to time, but I haven't seen it a while and things might of changed, so - Right now (July 2004) how does mysql stand up in...
1
by: Mike Landis | last post by:
Hello, Has anyone a small tool or somekind of document which could help me to convert Oracle SQL scripts to SQL Server? Scripts are not very Oracle specified. Thanks, Below is a Script...
5
by: premmehrotra | last post by:
I am using Microsoft Access 2000 and Oracle 9.2.0.5 on Windows 2000. When I export a table from Access to Oracle using ODBC I get error: ORA 972 identifier too long I think the error is because...
4
by: BookerW | last post by:
I am not sure which forum I should post this on, but here is the problem. I have a front end web application(VB) on asp,net 1.1 framework. Inside of the code, I have the following lines to...
1
by: Chris Skaryd | last post by:
Is it possible to have the Oracle OLEDB or ODAC drivers for 8i and 10g installed on the same machine? If so, is there a way to select oracle home's between 8i and 10g? I have an application...
2
by: Will | last post by:
We have several large Oracle databases that we are writing new front ends for in .Net. The applications will be Windows clients. We are looking for the best method for connecting with the Oracle...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Run multiple SQL statements from ASP/ADO to an Oracle 10g. Please help, I'm trying to write an ASP page to use ADO to run a long query against an Oracle 10g database, to create tables,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.