|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Connectivity of Oracle 8.0 with VB 6.0 [message #104441 is a reply to message #104393] |
Thu, 14 October 2004 19:36 |
Manu
Messages: 5 Registered: February 2002
|
Junior Member |
|
|
' DAO Example (Data Access Objects)
Dim wstemp As Workspace
Dim dbtemp As Database
Dim rstemp As Recordset
Set wstemp = DBEngine.Workspaces(0)
Set dbtemp = wstemp.OpenDatabase("", False, False, "ODBC;DSN=Oracle;USR=scott;PWD=tiger")
Set rstemp = dbtemp.OpenRecordset(myquery.Text, dbOpenDynaset, dbSQLPassThrough)
howmany = 0
Combo1.Clear
Do Until rstemp.EOF
msgbox rstemp(0)
rstemp.MoveNext
howmany = howmany + 1
Loop
' DAO Example (Data Access Objects)
Dim contemp As New rdoConnection
Dim rstemp As rdoResultset
Dim envtemp As rdoEnvironment
Set envtemp = rdoEngine.rdoEnvironments(0)
envtemp.CursorDriver = rdUseServer
' or rdUseOdbc, rdUseNone, rdUseIfNeeded, rdUseClientBatch
With contemp
.Connect = "ODBC;DSN=Oracle;USR=scott;PWD=tiger"
.EstablishConnection rdDriverNoPrompt, false, rdoForwardOnly
' or rdoStatic, rdoKeyset, rdoDynamic
End With
Set rstemp = contemp.OpenResultset("select ...") ' Your SQL here
End If
howmany = 0
With rstemp
Do Until .EOF Or howmany > 2000
msgbox .rdoColumns(0)
' Give a message box of the 1st column
.MoveNext
howmany = howmany + 1
Loop
ADO Example
dim conn as ADODB.Connection
dim rs as recordset
Conn.Open "...", "...", "..."
' ^DSN ^User ^Password
Set RS = Conn.Execute( "SELECT * FROM theTable" )
do while not rs.eof
msgbox RS(i).Value
rs.movenext
loop
Why are you guys repeatedly posting the same stuff? I guess the above code works fine. Try to learn from it & no double posts.
|
|
|
|
Re: Connectivity of Oracle 8.0i with VB 6.0 [message #104480 is a reply to message #104390] |
Wed, 27 October 2004 03:44 |
kailash
Messages: 1 Registered: October 2004
|
Junior Member |
|
|
DAO Example (Data Access Objects)
Dim wstemp As Workspace
Dim dbtemp As Database
Dim rstemp As Recordset
Set wstemp = DBEngine.Workspaces(0)
Set dbtemp = wstemp.OpenDatabase("", False, False, "ODBC;DSN=Oracle;USR=scott;PWD=tiger")
Set rstemp = dbtemp.OpenRecordset(myquery.Text, dbOpenDynaset, dbSQLPassThrough)
howmany = 0
Combo1.Clear
Do Until rstemp.EOF
msgbox rstemp(0)
rstemp.MoveNext
howmany = howmany + 1
Loop
' DAO Example (Data Access Objects)
Dim contemp As New rdoConnection
Dim rstemp As rdoResultset
Dim envtemp As rdoEnvironment
Set envtemp = rdoEngine.rdoEnvironments(0)
envtemp.CursorDriver = rdUseServer
' or rdUseOdbc, rdUseNone, rdUseIfNeeded, rdUseClientBatch
With contemp
.Connect = "ODBC;DSN=Oracle;USR=scott;PWD=tiger"
.EstablishConnection rdDriverNoPrompt, false, rdoForwardOnly
' or rdoStatic, rdoKeyset, rdoDynamic
End With
Set rstemp = contemp.OpenResultset("select ...") ' Your SQL here
End If
howmany = 0
With rstemp
Do Until .EOF Or howmany > 2000
msgbox .rdoColumns(0)
' Give a message box of the 1st column
.MoveNext
howmany = howmany + 1
Loop
ADO Example
dim conn as ADODB.Connection
dim rs as recordset
Conn.Open "...", "...", "..."
' ^DSN ^User ^Password
Set RS = Conn.Execute( "SELECT * FROM theTable" )
do while not rs.eof
msgbox RS(i).Value
rs.movenext
loop
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Connectivity of Oracle 8.0i with VB 6.0 [message #113299 is a reply to message #104480] |
Fri, 01 April 2005 02:54 |
krishnapotturi
Messages: 2 Registered: April 2005 Location: Hyderabad
|
Junior Member |
|
|
hai,
can u please tell me how to create data reports in vb6.0 with oracle back-end.
The resport is generated based on the user give date. how to pass the date from form to data report and how to generate data report.
Please Help me it is urgent.
thans
|
|
|
Connectivity of Oracle 8.0i with VB 6.0 [message #216528 is a reply to message #108950] |
Mon, 29 January 2007 03:59 |
ajayrahi
Messages: 1 Registered: January 2007
|
Junior Member |
|
|
Sarvesh Chaudhary wrote on Sun, 20 February 2005 10:58 | Hello,
Please write me code of Connectivity of Oracle 8.0i with VB 6.0
thanx & regards
sarvesh
|
Dear Sir,
Please write me code of Connectivity of Oracle 8.0i with VB 6.0
thanx & regards
with warm regards,
Ajay Rastogi.
|
|
|