473,799 Members | 3,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Upd ate(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.Fil l(dataSet); or command.Execute rReader(); )
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 2296

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

Similar topics

4
19997
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
18458
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. The Oracle by default is case-sensitive, How can used case-insensitive in oracle. Thanks Madjid Nasiri
133
9097
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 comparison to oracle? We are seriously considering migrating our multi-processor oracle system to mysql to save on licensing costs, and would need several features that mysql may or may not have:
1
9289
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 that I would e.g convert to MS SQLServer:
5
4355
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 one or more columns in Access table are longer than 30 characters. My question is how one can overcome this problem. I also see several column names which have /, ? or spaces in name
4
5727
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 connect to the database If gbSQLServer Then 'sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\w\vgyl\hy.mdb" gsConnectionString = "Provider=SQLOLEDB;Data Source=frt4;Initial Catalog=SRMSM;Integrated Security=SSPI" Else
1
7254
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 written in VB6 against an 8.1.7 database. The database is being migrated to 10g on a separate server. My client would like to run in parallel for a few weeks entering and querying the same data from both servers. The application has been...
2
1589
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 database. The Microsoft data provider requires the Oracle client to be installed, a huge footprint at 250 meg. ODAC (from Oracle) is another 250 meg install. We aren't opposed to using ODBC (which requires Oracle Client as well) for whatever...
7
20332
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, if they do not already exist. In terms of ASP/ADO, that would be fine in a SQL Server Sense by a simply ASP/Server-Side JavaScript as such: var cnTemp = Server.CreateObject("ADODB.Connection");
0
9546
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
10490
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
10260
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...
0
9078
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5467
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
5590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.