Solved

connection

Posted on 2002-05-30
10
141 Views
Last Modified: 2010-05-02
How i can get connected with VB and ORACLE database
0
Comment
Question by:shaibu_aug
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 7045279
0
 
LVL 1

Expert Comment

by:pit__
ID: 7045501
The easiest way would be to just make a DSN to point to the Oracle database.  i.e. In the Data Sources under the Control Panel, make a DSN using 'Oracle ODBC Driver' (which comes with Oracle Client 7.2 and higher I believe).  Then in VB, simply set the ConnectionString property of an ADODB.Connection object to the DSN...

i.e.

Dim ADOConn As ADODB.Connection
Dim ADORS As ADODB.Recordset

ADOConn.ConnectionString="DSN=MyOracleDSN;UID=user;PW=pass"
Set ADORS = ADOConn.Execute("SELECT ......
0
 

Expert Comment

by:laws
ID: 7048608
The first,You may make a System DSN to link the Oracle database in ODBC DATA SOURCE from WINDOWS CONTROL-PANEL.Then:

Dim ADOConn As ADODB.Connection
dim rs As ADODB.Recordset
ADOConn.open "Your DSN's name"
rs.open Sqlstring,ADOConn,.......

0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 18

Expert Comment

by:bobbit31
ID: 7048688
laws,

welcome to ee... please see the recommended policy on posting solutions (most experts here only post comments).
Once proposing an answer you lock the question out for other experts to view. In addition, your comment is very similar to pits.

Tips on Comments and Answers
Comments
Comments are intended to be used as a collaboration tool. Many Experts choose to post their solutions as comments only.

Answers
An answer is a specific solution to a question and should be submitted if it will solve the questioner's problem and doesn't duplicate a previous comment.

Comment Vs. Answer
If you are unsure of your solution, post it as a comment. Members can accept comments as solutions and award you Expert Points for them.

 
0
 

Expert Comment

by:laws
ID: 7049198
Bobbit31,
   Thanks,I see.
0
 
LVL 1

Expert Comment

by:nikelsh
ID: 7060999
use this

set objConn=createobject("adodb.connection")
   objConn.Open ="Provider=OraOLEDB.Oracle;" & _
             "Data Source=rnd;" & _
          "User Id=ndsnl;" & _
                "Password=ndsnl;" & _
          "SERVER=nt_niklesh;"
   
set objrs=createobject("adodb.recordset")

this connection string is my existing prog string just change with our DataSource,userid,passowrd,server.

nikelsh
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7078677
Greetings.

This question has been locked with a Proposed Answer, and remains open today.

If the Proposed Answer did not serve your needs, please reject it and comment with an update.  If the Proposed Answer helped you, please accept it to grade and close this question.  If you need help splitting points between multiple experts, please comment here with details so we can help you.

EXPERTS ->  Please guide me here in terms of closing recommendations if the Asker does not respond in 4 days.

Thanks to all,
Moondancer - EE Moderator
0
 
LVL 1

Expert Comment

by:kodiakbear
ID: 7522865
Dear laws
I've rejected your proposed answer as Experts Exchange holds an experiment to work without the answer button.

See: <http://www.experts-exchange.com/jsp/communityNews.jsp>
Paragraph: Site Update for Wednesday, November 06, 2002

By this rejection the Asker will be notified by mail and hopefully he will take his responsibility to finalize the question or post an additional comment.
The Asker sees a button beside every post which says "Accept This Comment As Answer" (including rejected answers) -- so if he/she thinks yours is the best, you'll be awarded the points and the grade.

EXPERTS: I will return in seven days to close this question.
Please leave your thoughts and recommendations here

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Thanks !

kodiakbear
Experts Exchange Moderator
0
 
LVL 16

Expert Comment

by:twalgrave
ID: 7896924
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 points NOT refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

twalgrave
Cleanup Volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7941761
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 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