Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SIMPLE Oracle with VB6
Using rdo connectivity:
'First Create the engine
With rdoEngine
.rdoDefaultCursorDriver = rdUseClientBatch
.rdoDefaultUser = "ggarrison"
.rdoDefaultPassword = "oracle_password"
End With
Dim cn As rdoConnection
Dim strConnection As String
strConnection = "DSN=oracle_instance; UID=ggarrison; PWD=oracle_password;"
Set cn = rdoEngine.rdoEnvironments(0).OpenConnection ("oracle_instance",rdDriverNoPrompt,False,strConnection)
Dim rs As rdoResultSet
Dim strSql As String
StrSQL = "Select ..."
Set rs = cn.OpenResultset
(strSQL,rdOpenKeyset,rdConcurValues)
This should work without any hitches. Put the select and result set in a button object and the rest in the load event of the form. If you are looking for ADO or Oracle for OLE let me know.
Maybe you can help me since you are an Oracle user. Using VB, how do you query data from an Oracle procedure to return to VB? The following does not work as it does in Sybase or SQLServer:
create proc
begin
Select * from oracle_table;
End
End proc;
What would be the equivalent of this in oracle?
Many thanks.
ggarrisonsr_at_hotmail.com