| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle ODT / ODAC create table with C# .Net
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:
[code]
string sql = "SELECT * from transactions";
OracleCommand cmd = new OracleCommand(sql, oracleConnection);
cmd.CommandType = CommandType.Text;
dataAdapter = new OracleDataAdapter(cmd);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet);
DataGridView grdTransactions.DataSource = dataSet.Tables[0];
[/code]
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:
as far as possible I want to keep away from SQL commands and rather just use classes instead!
Thanks in advance. Received on Mon Mar 19 2007 - 04:13:13 CDT
![]() |
![]() |