OleDbDataAdapter daMAD = new OleDbDataAdapter();
daMAD.SelectCommand = new OleDbCommand(sqlMAD, _connOleDb);
DataSet dsMAD = new DataSet();
dsMAD.CaseSensitive = true;
OleDbCommandBuilder cbMAD = new OleDbCommandBuilder(daMAD);
daMAD.Fill(dsMAD, _dataTableMAD);
// Create CommandText with CommmandBuilder object for each Dataset
daMAD.InsertCommand = cbMAD.GetInsertCommand();
daMAD.UpdateCommand = cbMAD.GetUpdateCommand();
daMAD.DeleteCommand = cbMAD.GetDeleteCommand();
The cold below works when I connect to a SQL Server 2000 database, but not
when I connect to Oracle 8.1.7.
Has anyone had this problem before, or have an idea on how to make this code
work on Oracle? The script used to create the table as it is in Oracle is:
CREATE TABLE merak_attribute_dict (
archive_id NUMBER(10,0) NOT NULL ,
dictionary_id NUMBER(10,0) NOT NULL ,
owner_id NUMBER(10,0) NULL ,
name VARCHAR2(50) NOT NULL,
data_type NUMBER(10,0) NOT NULL ,
description VARCHAR2(250)
)
Thanks in advance,
Dave White
Schlumberger Information Solutions
"Dave White" <da...@merak.com> wrote in message
news:ezn3qmkF...@TK2MSFTNGP12.phx.gbl...
alter table merak_attribute_dict
add constraint pk_merak_attribute_dict PRIMARY KEY
(archive_id,dictionary_id)
USING INDEX TABLESPACE &INDX_TABLESPACE
STORAGE( initial 40K next 20K pctincrease 0 )
Thanks in advance,
Dave
"Marina" <zlat...@nospam.hotmail.com> wrote in message
news:#WBzESlF...@TK2MSFTNGP12.phx.gbl...
To make the *CommandBuilder work properly, I often had to simplify the
commandtext so that the "base table" was easier for it to figure out. You
don't actually do another fill() or execute() with that commandtext in
place... it's just to help CommandBuilder do it's job. If you need to use
that command object again... I guess you could just switch back to the
orginal commandtext afterwards.
So, in this case... right before
OleDbCommandBuilder cbMAD = new OleDbCommandBuilder(daMAD);
Add this:
daMAD.SelectCommand.CommandText = string.format("select * from
merak_attribute_dict");
"Dave White" <da...@merak.com> wrote in message
news:ezn3qmkF...@TK2MSFTNGP12.phx.gbl...