Solved

connection

Posted on 2002-05-30
10
140 Views
Last Modified: 2010-05-02
How i can get connected with VB and ORACLE database
0
Comment
Question by:shaibu_aug
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

830 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