odac 5.8 version was working correctly at the source
odac 6.90.0.51/ 6.90.0.58 version does not work.
I'm using update query 'net error 0' message occurs.
Sources are listed below.
--------------------------------------------------
SQL.Text: =
'UPDATE TR_REPOSITORY SET' +
'REP_NAME =: REP_NAME,' +
'CREATE_USER =: CREATE_USER,' +
'LAST_MIG_USER =: LAST_MIG_USER,' +
'IS_DELETE =: IS_DELETE' +
'WHERE REP_ID =: REP_ID';
ParamByName ('REP_ID'). AsInteger: = REP_ID;
ParamByName ('REP_NAME'). AsString: = REP_NAME;
ParamByName ('CREATE_USER'). AsString: = CREATE_USER;
ParamByName ('LAST_MIG_USER'). AsString: = LAST_MIG_USER;
ParamByName ('IS_DELETE'). AsString: = IS_DELETE;
ExecSQL;
--------------------------------------------------
Net Error 0
The following table srcipt like.
CREATE TABLE TR_REPOSITORY
(
REP_ID NUMBER,
REP_NAME VARCHAR2 (300 BYTE),
CREATE_DATE DATE DEFAULT SYSDATE,
CREATE_USER VARCHAR2 (100 BYTE),
LAST_MIG_DATE DATE,
LAST_MIG_USER VARCHAR2 (100 BYTE),
IS_DELETE CHAR (1 BYTE) DEFAULT 'N' NOT NULL,
RES_CNT NUMBER DEFAULT 0,
RES_SIZE NUMBER DEFAULT 0
)
- Connection mode uses the Direct
- Oracle server Version of Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 64bi is
- Unicode mode does not use.
thank you!
CREATE TABLE TR_REPOSITORY
(
REP_ID NUMBER,
REP_NAME VARCHAR2 (300 BYTE),
CREATE_DATE DATE DEFAULT SYSDATE,
CREATE_USER VARCHAR2 (100 BYTE),
LAST_MIG_DATE DATE,
LAST_MIG_USER VARCHAR2 (100 BYTE),
IS_DELETE CHAR (1 BYTE) DEFAULT 'N' NOT NULL,
RES_CNT NUMBER DEFAULT 0,
RES_SIZE NUMBER DEFAULT 0
)
- Connection mode uses the Direct
- Oracle server Version of Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 64bi is
- Unicode mode does not use.
thank you!
Hello
I executed the following code:
This code was executed and table was updated without any errors.
I cannot reproduce this issue. Please modify the code that I posted before so it will reproduce your issue.
I executed the following code:
Code: Select all
var
OraSession: TOraSession;
OraQuery: TOraQuery;
TableName: string;
begin
TableName := 'TR_REPOSITORY_TEMP';
OraSession := TOraSession.Create(self);
OraQuery := TOraQuery.Create(self);
try
OraSession.Options.Direct := True;
OraSession.Server := 'DB:1525:ORCL1020';
OraSession.Username := 'scott';
OraSession.Password := 'tiger';
OraSession.Open;
OraQuery.Session := OraSession;
//--- Prepare table ---
try
OraQuery.SQL.Text := 'drop table ' + TableName;
OraQuery.ExecSQL;
except
end;
OraQuery.SQL.Text :=
'CREATE TABLE ' + TableName + ' ' +
'( ' +
'REP_ID NUMBER, ' +
'REP_NAME VARCHAR2 (300 BYTE), ' +
'CREATE_DATE DATE DEFAULT SYSDATE, ' +
'CREATE_USER VARCHAR2 (100 BYTE), ' +
'LAST_MIG_DATE DATE, ' +
'LAST_MIG_USER VARCHAR2 (100 BYTE), ' +
'IS_DELETE CHAR (1 BYTE) DEFAULT ''N'' NOT NULL, ' +
'RES_CNT NUMBER DEFAULT 0, ' +
'RES_SIZE NUMBER DEFAULT 0 ' +
')';
OraQuery.ExecSQL;
OraQuery.SQL.Text :=
'insert into ' + TableName + '(REP_ID, IS_DELETE) values(1, ''N'')';
OraQuery.ExecSQL;
//--- Update table ---
OraQuery.SQL.Text :=
'UPDATE ' + TableName + ' SET ' +
'REP_NAME = :REP_NAME, ' +
'CREATE_USER = :CREATE_USER, ' +
'LAST_MIG_USER = :LAST_MIG_USER, ' +
'IS_DELETE = :IS_DELETE ' +
'WHERE REP_ID = :REP_ID';
OraQuery.ParamByName('REP_ID').AsInteger := 1;
OraQuery.ParamByName('REP_NAME').AsString := '1';
OraQuery.ParamByName('CREATE_USER').AsString := '1';
OraQuery.ParamByName('LAST_MIG_USER').AsString := '1';
OraQuery.ParamByName('IS_DELETE').AsString := 'd';
OraQuery.ExecSQL;
finally
OraQuery.Destroy;
OraSession.Destroy;
end;
end;I cannot reproduce this issue. Please modify the code that I posted before so it will reproduce your issue.
The problem is resolved.
The problem is resolved.
oracle server automatically set the charset values have not been.
Was resolved by setting the value on the design.
oracle server automatically set the charset values have not been.
Was resolved by setting the value on the design.