dhanush
asked on
Advantages and disadvantages of VB/ORACLE and PB/ORACLE
Can anybody give me suggestions that which is best to develop? VB/ORACLE or PB/ORACLE?
ASKER
Thanks for your comments. Giving more points for the right answer is not problem for me.
Look also http://thebestweb.com/db/dbaccesscode.asp
What is VB and what is it used for?
Visual Basic (VB) is an extremely popular and easy to use programming language provided by Microsoft Corporation. VB is mainly used to develop Windows based applications with.
What is DAO, RDO and OLE DB? Which one should one use?
DAO, RDO, ADO and OLE DB are data access methods that all accomplish exactly the same task.
DAO - Data Access Objects (1-tier)
Allow VB applications to talk to a database (the JET Engine) via ODBC. DAO was Microsoft's first object oriented solution for the manipulation of databases using the Jet Database Engine. The JET engine duplicates the functionalities of ODBC, and thus does not add much value. As the JET engine is generic, many of Oracle's features would not be accessible. Microsoft is currently phasing out this method.
RDO - Remote Data Objects (2-tier)
Allow VB applications to talk to a relational database (various Relational DBMSs) via ODBC. RDO is an interface to remote RDBMS via OBDC. One needs the Enterprise Edition of Visual Basic to use RDO. Microsoft is encouraging developers to migrate their RDO programs to ADO and OLE-DB.
ADO - ActiveX Data Objects (1 to n-tier)
Allow VB/Other Web Tools (Browsers) to interface with different kinds of data sources. ADO is a more recent Microsoft Data Access technology designed to replace DAO and RDO. ADO is designed to be simpler to use and more powerful than DAO/RDO. Serves an interface to Microsoft's new OLE-DB technology (thinner than ODBC). Can be used to access all sorts of "non traditional data" (e.g., web pages/documents, etc.).
OLE DB data provider
OLE DB is Microsoft's successor to ODBC that utilizes a set of COM interfaces for accessing and manipulating of data. Oracle implemented OLE DB as part of their "Oracle Provider for OLE DB" client software. It provides interface for both data-consuming applications and database providers. OLE DB is considered a thin middle layer which provides better data access performance.
Summary
RDO and DAO still works in VB for backwards compatibility. However, it is best to convert to ADO or OLE-DB.
How does one connect to Oracle from VB?
Connectivity to Oracle is provided via ODBC or OO4O (Oracle Objects for OLE). For more information about ODBC, read the ODBC FAQ. For information about OO4O, read the OO4O FAQ. Look at this examples:
' 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(myque ry.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("sel ect ...") ' 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
Set RDODatabase = rdoEnvironments(0).OpenCon nection("" , rdDriverNoPrompt, True, "") Set RDOResultSet = RDODatabase.OpenResultset( SqlString. Text) TxtNumRows.Text = RDOResultSet.RowCount
What is VB and what is it used for?
Visual Basic (VB) is an extremely popular and easy to use programming language provided by Microsoft Corporation. VB is mainly used to develop Windows based applications with.
What is DAO, RDO and OLE DB? Which one should one use?
DAO, RDO, ADO and OLE DB are data access methods that all accomplish exactly the same task.
DAO - Data Access Objects (1-tier)
Allow VB applications to talk to a database (the JET Engine) via ODBC. DAO was Microsoft's first object oriented solution for the manipulation of databases using the Jet Database Engine. The JET engine duplicates the functionalities of ODBC, and thus does not add much value. As the JET engine is generic, many of Oracle's features would not be accessible. Microsoft is currently phasing out this method.
RDO - Remote Data Objects (2-tier)
Allow VB applications to talk to a relational database (various Relational DBMSs) via ODBC. RDO is an interface to remote RDBMS via OBDC. One needs the Enterprise Edition of Visual Basic to use RDO. Microsoft is encouraging developers to migrate their RDO programs to ADO and OLE-DB.
ADO - ActiveX Data Objects (1 to n-tier)
Allow VB/Other Web Tools (Browsers) to interface with different kinds of data sources. ADO is a more recent Microsoft Data Access technology designed to replace DAO and RDO. ADO is designed to be simpler to use and more powerful than DAO/RDO. Serves an interface to Microsoft's new OLE-DB technology (thinner than ODBC). Can be used to access all sorts of "non traditional data" (e.g., web pages/documents, etc.).
OLE DB data provider
OLE DB is Microsoft's successor to ODBC that utilizes a set of COM interfaces for accessing and manipulating of data. Oracle implemented OLE DB as part of their "Oracle Provider for OLE DB" client software. It provides interface for both data-consuming applications and database providers. OLE DB is considered a thin middle layer which provides better data access performance.
Summary
RDO and DAO still works in VB for backwards compatibility. However, it is best to convert to ADO or OLE-DB.
How does one connect to Oracle from VB?
Connectivity to Oracle is provided via ODBC or OO4O (Oracle Objects for OLE). For more information about ODBC, read the ODBC FAQ. For information about OO4O, read the OO4O FAQ. Look at this examples:
' 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
Set rstemp = dbtemp.OpenRecordset(myque
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(
envtemp.CursorDriver = rdUseServer
' or rdUseOdbc, rdUseNone, rdUseIfNeeded, rdUseClientBatch
With contemp
.Connect = "ODBC;DSN=Oracle;USR=scott
.EstablishConnection rdDriverNoPrompt, false, rdoForwardOnly
' or rdoStatic, rdoKeyset, rdoDynamic
End With
Set rstemp = contemp.OpenResultset("sel
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
Set RDODatabase = rdoEnvironments(0).OpenCon
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- PAQ'd and pts removed
Please leave any comments here within the
next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
Nic;o)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://www.experts-exchange.com/dbgen/Q.20292000.html
Note that you don't need to assign points in all the questions, 1 q with points, and the others including the link like above can/should remain with 0 points.
CHeers