Oracle Script Bug?

Oracle Script Bug?

Postby degas » Wed 24 Jun 2009 20:58

I am using the OracleScript component and trying to run the following sql:
"set role all"
But this does not work and does not appear in the OracleMonitor (it does not even fires an exception or an error). I have managed to make it work by setting the sql to:
"begin
set role all;
end;"

I think this is not ok, because from sqlplus (also TOAD), the fisrt script runs smoothly.
degas
 
Posts: 77
Joined: Mon 16 Feb 2009 18:36
Location: Argentina

Postby Shalex » Thu 25 Jun 2009 12:24

We will investigate the problem and notify you about the results as soon as possible.
Shalex
Devart Team
 
Posts: 7533
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Wed 01 Jul 2009 09:28

The problem is fixed. Look forward to the next build of dotConnect for Oracle.
Shalex
Devart Team
 
Posts: 7533
Joined: Thu 14 Aug 2008 12:44

Re: Oracle Script Bug?

Postby lewis » Mon 29 Apr 2013 17:29

Hi, a im trying to execute the following SQL command by setting the ScriptText property in my OracleScript, I know my SQL command is wrong, but when i execute the script nothing happens, it seems like everything was fine, however the real error is "Error: PLS-00103: Encountered the symbol "6550" when i use other IDE, also the
oraclescript does not even fires an exception or oracleScript1_Error(object sender, CoreLab.Common.ScriptErrorEventArgs e)

the following is the code :


try
{
this.oracleScript1.ScriptText = "CREATE OR REPLACE PROCEDURE Dept_Insert (\n" +
"PDeptNo NUMBER,\n" +
"PDName VARCHAR, \n" +
"PLoc VARCHAR )\n" +
"IS \n" +
"BEGIN\n" +
"\n" +
" INSERT INTO Dept(DeptNo, DName, Loc) VALUES (PDeptNo, PDName, PLoc);\n" +
"END;\n" +
" \n" +
"\n" +
"6550\n" +
" \n" +
" \n" +
"CREATE TABLE DEPT (\n" +
" DEPTNO NUMBER(2) CONSTRAINT PK_DEPT PRIMARY KEY,\n" +
" DNAME VARCHAR2(14) ,\n" +
" LOC VARCHAR2(13)\n" +
");\n" +
" \n" +
"INSERT INTO EMP VALUES\n" +
"(7934,'MILLER','CLERK',7782,to_date('23-1-1982','dd-mm-yyyy'),1300,NULL,10);\n";
this.oracleScript1.Execute();

}
catch (Exception ex)
{

MessageBox.Show(ex.Message);
}
lewis
 
Posts: 13
Joined: Thu 13 Sep 2012 15:59

Re: Oracle Script Bug?

Postby Pinturiccio » Tue 07 May 2013 14:58

We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.

As a temporary workaround, try using the InfoMessage event of the OracleConnection object. For this, you should change your code as follows:
Code: Select all
try
{
this.oracleScript1.Connection.InfoMessage +=new OracleInfoMessageEventHandler(conn_InfoMessage);
this.oracleScript1.ScriptText = "CREATE OR REPLACE PROCEDURE Dept_Insert (\n" +
"PDeptNo NUMBER,\n" +
"PDName VARCHAR, \n" +
"PLoc VARCHAR )\n" +
"IS \n" +
"BEGIN\n" +
"\n" +
" INSERT INTO Dept(DeptNo, DName, Loc) VALUES (PDeptNo, PDName, PLoc);\n" +
"END;\n" +
" \n" +
"\n" +
"6550\n" +
" \n" +
" \n" +
"CREATE TABLE DEPT (\n" +
" DEPTNO NUMBER(2) CONSTRAINT PK_DEPT PRIMARY KEY,\n" +
" DNAME VARCHAR2(14) ,\n" +
" LOC VARCHAR2(13)\n" +
");\n" +
" \n" +
"INSERT INTO EMP VALUES\n" +
"(7934,'MILLER','CLERK',7782,to_date('23-1-1982','dd-mm-yyyy'),1300,NULL,10);\n";
this.oracleScript1.Execute();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
...

static void conn_InfoMessage(object sender, OracleInfoMessageEventArgs e)
{
    foreach (OracleError error in e.Errors)
        MessageBox.Show(error.Message);
}
Pinturiccio
Devart Team
 
Posts: 1933
Joined: Wed 02 Nov 2011 09:44

Re: Oracle Script Bug?

Postby Pinturiccio » Wed 15 May 2013 14:48

We think that this is a designed behavior. To get an error message inside the script text, use the InfoMessage event of the OracleConnection object.
Pinturiccio
Devart Team
 
Posts: 1933
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle