Closed hasan3ysf closed 10 years ago
Hi Hasan,
can you share rest of your code following insert statement? Have you checked the database - whether insert actually did succeed?
Thanks.
Hi Alex, The insert happened in the database, ! I tried using update SQL statement with 0.0.7 edition, same thing happened, error appeared, but update had been executed.
Below the code I used.
import 'package:oracledart/oracledart.dart';
void main() { print("Hello, World!");
connect(
"SYSTEM",
"..system password ..",
"(DESCRIPTION="
"(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))"
"(CONNECT_DATA=(SERVICE_NAME=XE)(SERVER=DEDICATED)))")
.then(
(oracleConnection) {
print('hi from inside the block');
var resultset1 = oracleConnection.select("insert into ppl (personid, lastname, firstname) values (4,'Hasan','Yara')");
resultset1.next();
},
onError: (error) {
print("Failed to connect: $error");
}
);
}
Hi Hasan,
Got it.
There is no result set produced by insert or update, so this is actually as expected.
Hope this helps.
On Jul 9, 2014 3:41 PM, Hasan Yousef notifications@github.com wrote:
Hi Alex, The insert happened in the database, ! I tried using update SQL statement with 0.0.7 edition, same thing happened, error appeared, but update had been executed.
Below the code I used.
import 'package:oracledart/oracledart.dart';
void main() { print("Hello, World!");
connect( "SYSTEM", "..system password ..", "(DESCRIPTION=" "(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))" "(CONNECT_DATA=(SERVICE_NAME=XE)(SERVER=DEDICATED)))") .then(
(oracleConnection) { print('hi from inside the block');
var resultset1 = oracleConnection.select("insert into ppl (personid, lastname, firstname) values (4,'Hasan','Yara')"); resultset1.next(); }, onError: (error) { print("Failed to connect: $error"); } );
}
Reply to this email directly or view it on GitHubhttps://github.com/aam/oracledart/issues/9#issuecomment-48523904.
:) thanks, the error gone once I removed the resultset1.next();
Great! Thanks for confirmation.
On Jul 9, 2014 3:57 PM, Hasan Yousef notifications@github.com wrote:
:) thanks, the error gone once I removed the resultset1.next();
Reply to this email directly or view it on GitHubhttps://github.com/aam/oracledart/issues/9#issuecomment-48526031.
Hi Alex, I created this SQL statement: var resultset1 = oracleConnection.select("insert into ppl (personid, lastname, firstname) values (2,'Hasan','Dana')");
but got an error saying "ORA-24374: define not done before fetch or execute and fetch" as attached.
thanks