Home » Infrastructure » Windows » Oracle Objects for OLE (OO4O)
Oracle Objects for OLE (OO4O) [message #101361] Thu, 26 August 2004 23:49 Go to next message
Halvard Gjøystdal
Messages: 1
Registered: August 2004
Junior Member
I have a package with name: H_SCHEDULER.STOPP_SCHEDULER.

I run this in SQL in this way:


And that works OK.

I have now created a Visual Basic 6.0 program with following line:

  Dim OraSession  As Object     'Declare variables as OLE Objects
  Dim OraDatabase As Object
  Dim OraDynaset  As Object

  Set OraSession =CreateObject    ("OracleInProcServer.XOraSession")
  Set OraDatabase = OraSession.DbOpenDatabase("EUROPA", "xxxxx/yyyyy", 0&)
  r = OraDatabase.dbExecuteSQL(csql)

But when i try to run the program i get an error:

     Run-time error '440'

     Sql execution error, ora-00900: invalid SQL statement


So my questions is: What is wrong with my VB code......
Re: Oracle Objects for OLE (OO4O) [message #101380 is a reply to message #101361] Sat, 04 September 2004 03:07 Go to previous message
Tak Tang
Messages: 142
Registered: May 2004
Senior Member
'EXECUTE' is SQL*Plus shorthand for BEGIN ... END;

Try this :-

Previous Topic: Oracle9i Installation
Next Topic: Installation of Personal Oracle 8 on Windows 2000
Goto Forum:

Current Time: Fri May 27 01:14:53 CDT 2022