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:

           execute H_SCHEDULER.STOPP_SCHEDULER

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&)
  csql = "EXECUTE H_SCHEDULER.STOPP_SCHEDULER"
  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 :-

csql = "BEGIN H_SCHEDULER.STOPP_SCHEDULER; END;"
Previous Topic: Oracle9i Installation
Next Topic: Installation of Personal Oracle 8 on Windows 2000
Goto Forum:
  


Current Time: Thu Mar 28 09:07:53 CDT 2024