RE: Urgent : ORACLE AND VBA6.0

From: Juan Miranda <jmirandavigo_at_hotmail.com>
Date: Wed, 11 Oct 2000 20:02:37 +0200
Message-ID: <8s29co$pq714_at_cesio.mundo-r.com>


[Quoted] You must hace Oracle - Objects installed in your PC. It is in all Oracle CD´s and in the web.
There are a lot of code to talk to MicroStation. Forget it.



Public msApp As Object
Public DGN As Object
Public Nodo As String
Public OraSession As Object
Public OraDatabase As Object
Public OraDynaset As Object
Dim PuedeDesh As Boolean
Dim ID_UI As Single

Private Sub cmdCAJA_Click()
On Error GoTo LBLERROR

Dim point As Object
Dim point1 As Object
Set point = msApp.mbepoint
Set point1 = msApp.mbepoint

Dim view%, status%
Dim Color As Integer
Dim Style As Integer
Dim Weight As Integer
Dim Angle As Integer

'Meto datos en la base de datos:

ID_UI = ID_UI + 1

OraDatabase.ExecuteSQL ("Insert into UIS (TIPO_A, TIPO_O, TIPO_N, TIPO_B,
NODO, ID_TABLA) values (" & txtA.Text & ", " & txtO.Text & ", " & txtN.Text
& ", " & txtB.Text & ", " & CStr(Nodo) & "," & ID_UI & ")")


Fin:
'Muestra mesajes de mst

    msApp.MbeState.errorMessages = 1
    msApp.MbeState.messages = 1

    msApp.MbeSendReset
    msApp.MbeStartDefaultCommand

Exit Sub
LBLERROR:
Call Error(" en el procedimiento : cmdCaja_Click Módulo: frmTablas") End Sub


Private Sub form_load()
On Error GoTo LBLERROR

Dim point As Object
Dim point1 As Object
Set msApp = CreateObject("MicroStation.Application") Set point = msApp.mbepoint
Set point1 = msApp.mbepoint
Dim newScale As Object
Set newScale = msApp.mbepoint
Set DGN = msApp.activedocument
PuedeDesh = False

'Set OraSession = CreateObject("OracleInProcServer.XOraSession") 'Set OraDatabase = OraSession.OpenDatabase("gal", "siren28r/siren28r", 0&) Set OraSession = Nothing
Set OraDatabase = Nothing

 Dim Usuario As String, Contraseña As String, Instancia As String

    Usuario = oracleUSER
    Contraseña = USERPASSWD
    Instancia = INSTANCE_NAME
    If Usuario = "" Or Contraseña = "" Or Instancia = "" Then

        MsgBox ("Fichero ini incorrecto")
        End

    End If
    'MsgBox ("Conectar con Oracle; " & Usuario & "\********\" & Instancia)     Set OraSession = CreateObject("OracleInProcServer.XOraSession")     Set OraDatabase = OraSession.OpenDatabase(Instancia, Usuario & "/" & Contraseña, 0&)

    'MsgBox ("Conexion correcta")
    BarraHerramientas.BarraConexion.BackColor = &HFF00&

Nodo = Left(DGN.Name, Len(DGN.Name) - 4)

Exit Sub
LBLERROR:
Call Error(" en el procedimiento : Form_load Módulo: frmTablas") End Sub


Brice.Butzerin <Brice.Butzerin_at_wanadoo.fr> escribió en el mensaje de noticias 8s27s4$clf$1_at_wanadoo.fr...
> Hello
> My question is : How to write in a table from Oracle with VBA?. It is
> compatible? What is the instruction for this? What DLL must I use for it?
> Must I use a instruction SQLserveur
> Thanks
> alouette50_at_wanadoo.fr

>
>
>
>
Received on Wed Oct 11 2000 - 20:02:37 CEST

Original text of this message