开发者

ADO Execute not reading a line of SQL code?

My code is below:

  var statement = "test_oracle.sql";
  F = aqFile.OpenTextFile(statement, aqFile.faRead, aqFile.ctANSI);
  F.Cursor =开发者_如何学JAVA 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?


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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜