how to connect vb6.0 to oracle 9i

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2007
Posts: 3
Reputation: sawant_deepu is an unknown quantity at this point 
Solved Threads: 0
sawant_deepu sawant_deepu is offline Offline
Newbie Poster

how to connect vb6.0 to oracle 9i

 
0
  #1
Jan 10th, 2007
i am bscit student and i am doing one project. so i want to urjently know how to connect vb6.0 to oracle 9i
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 188
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Re: how to connect vb6.0 to oracle 9i

 
0
  #2
Jan 10th, 2007
There are several ways to connect to Oracle 9i from VB 6. You can use a ODBC connection or use ADO (ActiveX Data Objects). For Remote servers, you can also use RDO.

There is no general 'best solution' and the best method for connectivity depends on the particular situation and specifications.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 188
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Re: how to connect vb6.0 to oracle 9i

 
0
  #3
Jan 11th, 2007
For Connecting via ADO to Oracle, you will need to have either the Oracle 9i Client Software installed in the client machines or create an ODBC data source. I usually prefer having the Oracle client installed, as it avoids having to create ODBCs.

To connect via ADO, you will need to specify the Connection parameters including server name, User Name and Password. The Code is like

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1.  
  2. Dim ConnString as string
  3. ConnString = "Provider=MSDAORA.1 ; Password=myPassword; User ID=myUser ; Data Source = ORCL; Persist Security Info=True"
  4. '// Where ORCL is the Oracle Service you are trying to connect
  5. Dim objConn as new ADODB.Connection
  6. objConn.open ConnString
This will create a connection to the specified Oracle service, using the user name and password to login.

If you are planning to use ADO, please look up a book or MSDN for explanation of the parameters and how to use them.
Last edited by aparnesh; Jan 11th, 2007 at 12:01 pm.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3
Reputation: sawant_deepu is an unknown quantity at this point 
Solved Threads: 0
sawant_deepu sawant_deepu is offline Offline
Newbie Poster

Re: how to connect vb6.0 to oracle 9i

 
0
  #4
Jan 14th, 2007
Hi Aparnesh thanks for replying.i have oracle 9i installed. actually the project i am doing is a company store management and i have to complete it till feb.and now i am confused whether i should use oracle as a back end or MS-Access.bcoz i have heard that if the connection is not properly set up with oracle then it can create problems.so what should i go for oracle or access?bcoz at the end moment it should not create any problems infront of external. do u have e-mail id . waiting for ur reply.bye
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 188
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Re: how to connect vb6.0 to oracle 9i

 
0
  #5
Jan 14th, 2007
If this is a student project and you are free to use any database you prefer, you should use whichever you are more comfortable with. If this is a commercial project, you should take into consideration how the client will use it, number of concurrent users, expected number of records to be stored etc.

I generally prefer Access for small commercial projects, which run as in a stand-alone machine (for small shop's sales counters, for example). For larger projects or for projects which are designed for multiple users, I use Oracle or mySQL depending on client's budget.

Till now, I haven't really faced any big connection related problems regarding Oracle-ADO-VB scenario. But if you are not familiar/comfortable with Oracle, you must have the assistance/guidance of someone who knows Oracle well. If you do not have any such resource, it would be better not to use Oracle.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 2
Reputation: priyanka patel is an unknown quantity at this point 
Solved Threads: 0
priyanka patel priyanka patel is offline Offline
Newbie Poster

Re: how to connect vb6.0 to oracle 9i

 
0
  #6
Nov 9th, 2008
Dim ConnString as string
ConnString = "Provider=MSDAORA.1 ; Password=myPassword; User ID=myUser ; Data Source = ORCL; Persist Security Info=True"
'// Where ORCL is the Oracle Service you are trying to connect
Dim objConn as new ADODB.Connection
objConn.open ConnString
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 27772 | Replies: 5
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC