Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ADO/ODBC with Oracle
Using ADO 1.5c and VB5-SP3:
<snip>
With gadoConnection
' Form the connect string.
.ConnectionString = .ConnectionString & "Driver={Microsoft ODBC
for Oracle}; "
.ConnectionString = .ConnectionString & "Server=myserver; "
.ConnectionString = .ConnectionString & "UID=user; "
.ConnectionString = .ConnectionString & "PWD=pwd"
.CommandTimeout = 10
.Open
<snip>
' [1998.07.28 : 1.00.0001] - Passed Testing
Public Sub RetTemplateInfo( _
ByVal intSelf As Integer, _
ByRef adoRecordset As ADODB.Recordset _
)
On Error GoTo errHandler
Dim adoCommand As New ADODB.Command
With adoCommand
.CommandText = "SELECT T1.T_SELF T_SELF, T1.T_NAME T_NAME, T2.T_NAME
T_BASED_ON FROM TBL_TEMPLATE T1, TBL_TEMPLATE T2 WHERE T1.T_PARENT =
T2.T_SELF(+) AND T1.T_SELF = ?"
.CommandType = adCmdText .Name = "RetTemplateInfo" .ActiveConnection = gadoConnection With .Parameters(0)
.Type = adInteger
.Direction = adParamInput
.Value = intSelf
![]() |
![]() |