Re: Connection to Oracle with Vb5

From: DeVeLoPeR <No_at_Email.NL>
Date: Thu, 10 Dec 1998 16:15:05 +0100
Message-ID: <74ooap$5dk$1_at_newton.a2000.nl>


Hi here some source....

First install the OCDB-DRIVER from Oracle... Get if from >>> http://technet.oracle.com/software/datacon.htm

Make With 32bit administrator a connection....

Datasourcename: [Just a name] for now "Patrick" Description: [just leave blank]
SQL Net connect string: [The name wich you entert bij Easy Net Config.......] here it is oracle .......

Private Sub Command1_Click()
Screen.MousePointer = 11
DoEvents
Dim Personeels_code As String
Dim Id_code_KLT As Long
Dim SearchString As String
Dim wrkODBC As Workspace
Dim conUitg As Connection
Dim Mijntabel As Recordset
Dim Mijntabel2 As Recordset
Dim Mijntabel3 As Recordset
Dim Zoeknummer As String
Set wrkODBC = CreateWorkspace("", "admin", "", dbUseODBC)

Set conUitg = wrkODBC.OpenConnection("", , True, "ODBC;UID=[login name];PWD=[Password];DSN=patrick")
SearchString = "SELECT * FROM cv$deelproject WHERE deelproj_code = '" & Text3.Text & "'"
Set Mijntabel = conUitg.OpenRecordset(SearchString, dbOpenDynaset, ReadOnly) If Mijntabel.RecordCount = 0 Then
Response = MsgBox(Msg, Style, Title, Help, Ctxt) Screen.MousePointer = 0
Exit Sub
End If
If Not Mijntabel![relatie_code_klt] = "" Then Id_code_KLT = Mijntabel![relatie_code_klt]
DoEvents
'Mijntabel.Close
'RELATIE
DoEvents
SearchString = "SELECT * FROM CV$RELATIE WHERE RELATIE_CODE = '" & Id_code_KLT & "'"
Set Mijntabel2 = conUitg.OpenRecordset(SearchString, dbOpenDynaset, ReadOnly)
If Mijntabel2.RecordCount = 0 Then
End Sub

That's IT !!!!

GreetinZ PaTrIcK

TurkBear heeft geschreven in bericht <366eaf34.8788577_at_news2.mm.com>...
>You can use Oracle Objects for OLE - available from www.oracle.com
>Check the 'free trial' section at that site for more info...This will allow
you
>to use native SqlNet to access the Oracle db, so no ODBC is involved....
>
>Just to satisfy my curiosity, why does you boss not want you to use ODBC.?
>
>
>
>Richard Asselin <chatnoir_at_microtec.net> wrote:
>
>>Hi,
>> I have to connect to the db Oracle with vb5 to transfert rows to a db
>>Access. And my boss don't whant that I use an ODBC connection. Any one
>>know how to do it?
>> (Sory for my English)
>> Richard Asselin
>
>To reply please remove the 'nospam' part of the address
Received on Thu Dec 10 1998 - 16:15:05 CET

Original text of this message