Solved

Advantages and disadvantages of VB/ORACLE and PB/ORACLE

Posted on 2002-04-21
5
590 Views
Last Modified: 2006-11-17
Can anybody give me suggestions that which is best to develop? VB/ORACLE or PB/ORACLE?
0
Comment
Question by:dhanush
5 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6959661
Your same q in dbgen:
http://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
0
 

Author Comment

by:dhanush
ID: 6959719
Thanks for your comments. Giving more points for the right answer is not problem for me.
0
 
LVL 47

Expert Comment

by:schwertner
ID: 6965272
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(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

Set RDODatabase = rdoEnvironments(0).OpenConnection("", rdDriverNoPrompt, True, "") Set RDOResultSet = RDODatabase.OpenResultset(SqlString.Text) TxtNumRows.Text = RDOResultSet.RowCount
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7515046

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)
0
 

Accepted Solution

by:
Jgould earned 0 total points
ID: 7548114
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
powerN  challenge 3 57
Exe program is not a valid Win 32 application 15 105
mapShare challenge 13 90
Turning python script into an applet 12 104
I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now