Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Error 91: Object Variable...", AFTER INSTALL APPLICATION

Status
Not open for further replies.

AlexHarley666

Programmer
Dec 5, 2002
31
0
0
CL
Hi!!!

Please help...

I got this error:

91: Object variable or with block not set, but it' appears after that I did install my application.

I connect to database in direct mode:

'INIT SYSTEM
Public Sub InitSystem()

On Error GoTo Error

DB_NAME = "tns:finan"
DB_CONNECT = "tbk/tbk2001"

If Not G_AbreBase Then
GoTo Error
End
End If

Exit Sub
Error:
MsgBox "No Se Puede Establecer Conexión con Base de Datos", vbCritical, "Error de conexión"
End Sub


'-------------------------------------------------------

and G_AbreBase Function is:


' OPEN DATABASE FUNCTION
Function G_AbreBase%()
'-----
'Abre la conexión a la Base de Datos en ORACLE.
'-----
'Retorna
' True : Si la conexión se concretó con éxito.
'-----
On Error GoTo ErrConnect
Set Sesion_Oracle = CreateObject("OracleInProcServer.XOraSession")
Set db_oracle = Sesion_Oracle.OpenDatabase(DB_NAME, DB_CONNECT, 0&)

G_AbreBase = True
Exit Function
ErrConnect:
G_AbreBase = False
Exit Function
End Function

I did define the variables:

Global db_oracle As Object
Global Sesion_Oracle As Object
Global DB_NAME$
Global DB_CONNECT$

'-------------------------------------------------------

PLEASE, I NEED YOUR HELP.

THANK YOU VERY MUCH IN ADVANCE for YOUR VITAL HELP...

I salutes you,

ALEX...
 

It may be that the client machine that you installed it to does not have the Oracle Client Tools installed. You can also check if the CreateObject() was successfull before opening the database:

Set Sesion_Oracle = CreateObject("OracleInProcServer.XOraSession")

If Not Session_Oracle Is Nothing Then
Set db_oracle = Sesion_Oracle.OpenDatabase(DB_NAME, DB_CONNECT, 0&)
G_AbreBase = True
Else
G_AbreBase = False
End If

Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top