Re: OO4O Problem

From: Ilia Bashtanov <iliab_at_mmc.ru>
Date: 1997/12/01
Message-ID: <348283C3.BFA56CAC_at_mmc.ru>#1/1


Hello, Mike!
Are you sure you want to keep the following statement commented?

' Set OraSession = CreateObject("OracleInProcServer.XOraSession")

Ilia Bashtanov
Moscow, Russia

Mike Chan wrote:

> Hi all,
>
> I'm trying the OO4O 2.2 beta and find error : Runtime error 91, object
> variable not set. Please help
> email : mike.chan_at_bigfoot.com
>
> Below is the codes:
> ---------------------
> Sub test()
>
> 'Declare variables as OLE Objects.
> Dim OraSession As Object
> Dim OraDatabase As Object
> Dim OraDynaset As Object
>
> 'Create the OraSession Object.
> ' Set OraSession = CreateObject("OracleInProcServer.XOraSession")
>
> 'Set up an error handler.
> On Error GoTo errhandler
>
> 'Create the OraDatabase Object by opening a connection to Oracle.
> Set OraDatabase = OraSession.DbOpenDatabase("ExampleDb", "scott/tiger",
> 0&)
>
> 'Attempt to Create the OraDynaset Object.
>
> 'Notice that the FROM keyword is missing from the SQL statement.
> Set OraDynaset = OraDatabase.DbCreateDynaset("select * emp", 0&)
>
> Exit Sub
>
> errhandler:
>
> 'Check to see if an Oracle error has occurred.
> If OraDatabase.LastServerErr <> 0 Then
> MsgBox OraDatabase.LastServerErrText
> Else 'Must be some non-Oracle error
> MsgBox "VB:" & Err & " " & Error(Err)
> End If
>
> Exit Sub
>
> End Sub
Received on Mon Dec 01 1997 - 00:00:00 CET

Original text of this message