views:

43

answers:

2

My code is below:

  var statement = "test_oracle.sql";
  F = aqFile.OpenTextFile(statement, aqFile.faRead, aqFile.ctANSI);
  F.Cursor = 0;
  while(! F.IsEndOfFile()){
    s = F.ReadLine();
    oResult = Project.Variables.oConnection.Execute_(s);

The first line that "s" reads is: set serverout on size 10000

An error is returned as "ORA-00922: missing or invalid option"

Can anyone provide guidance?

+1  A: 

It seems to me that your problem is not with jscript or ado.net, but your sql in that sql file is invalid.

If you look at this page for example: http://webcache.googleusercontent.com/search?q=cache:N0n7PtpJH4gJ:www.daniweb.com/forums/thread197500.html+ORA-00922:+missing+or+invalid+option&cd=3&hl=en&ct=clnk&gl=us&client=firefox-a

you will see that everyone who got that oracle error got it because of bad syntax.

does that sql execute in a sql client?

mkoryak
Actually it turned out I was sending SQL+ statements to something that didn't need the serverout size set.
llaskin
+1  A: 

It turned out that I was sending a SQL+ statement to a pure SQL environment. This caused it to error on the Set Serverout statement

llaskin