473,783 Members | 2,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DSN-less pass-through queries with Oracle driver

In Access 97, I have successfully created a DSN-less pass-thru query
to Oracle using the MS ODBC For Oracle driver. I used a connection
string like this:

ODBC;Driver={Mi crosoft ODBC For Oracle}; Server=our_tnsn ame;
UID=my_userid; PWD=my_password

However, our DBAs are concerned about this driver and have insisted we
use the Oracle ODBC Driver [from Oracle] instead.

I've tried a number of formats for the connection string, none of
which work. Here is an example:

ODBC;Driver={Or acle ODBC Driver}; dbq=our_tnsname ; UID=my_userid;
PWD=my_password

The error I get from this is:

Reserved error (-7778); there is no message for this error.

Is there a way to make this work? If so, how?

Thanks,
Bruce
Nov 13 '05 #1
1 5134
Well, just know that the Oracle driver is more reliable than the
Microsoft Oracle ODBC driver. Once that is installed and configured
(use Net8 or 9 configuration assistant and Net8 or 9 assistant that
comes with the installation of the Oracle driver) you will have a
service upon which you will create your ODBC dsn. The best way to
access the Oracle ODBC dsn is through ADO. So make sure you also have
Mdac2.5 (which contains Jet) and Mdac2.6 loaded on the computer. Then,
in Access, you can link to the Oracle table you need (you need to do
this so that you can look at the connection string to see what the table
is named - ususally some Oracle type prefix), make a reference to
Mdac2.6 in tools/References. Then here is the code for using ADO with
Oracle from Access:

Dim conn As New ADODB.Connectio n
Dim Rst As New ADODB.Recordset
Dim strSql As String

conn.Connection String = "Data Source=ccc" & _
";User ID=Steve;Passwo rd=Tiger"
conn.Open
Rst.CursorLocat ion = adUseClient
Rst.Open "SELECT * FROM CCC2.TRANSFER", conn
Do While Not Rst.EOF
For i = 0 to Rst.Fields.Coun t - 1
Debug.Print Rst(i) & ", ";
Next
Debug.Print
Rst.MoveNext
Loop
Rst.Close
conn.Close
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2218
by: Thomas Scheiderich | last post by:
I have a page that is trying to connect to my SQL Database. All the code I have seen shows me to connect the same way. The error I am getting says: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Data source name not found and no default driver specified /connectDB.asp, line 13
0
2855
by: Leader | last post by:
HI All, I created a SQL Server DSN using Windows ODBC Data Source Administrator. While creating the DSN, it asked me about authentication process in reply to which I selected "With SQL Server authentication using a login ID and password entered by the user." and then gave my SQL Server login ID and password. After following the regular instruction after that I successfully created the DSN and even tested that using the "Test Data Source"...
3
3516
by: kakaz | last post by:
Hi All there! I am quite new in MS SQL administration so let me explain how it work on Your instances of SQL Servers. We have several DTS packages on our server, all of them managed on some station which have seriously hardvare problem. So we wolud like to catch two problems at one time and decided to develop systematic way of DTS manipulation. One of several aspects of this operation would be migration from system ODBC data sources...
0
1880
by: Plunaldo | last post by:
Hi All I use a ODBC Connection to Connect to a AS400 System. I created a new DSN in the Windows System. The Databaseaccess is made directly out of the Crystal Report...so the Crystal Report is bound to the DSN i made in my Windowssystem. My Question is...How can i make a deploymentpackage and deploy my stuff on a customer machine with a diffrent DSN...can i specify the DSN somewhere outside Crystal Report to change it to a new one? or do i...
2
6303
by: Tina Robichaux | last post by:
I have found info on this problem at MS, but they say this problem does not occur with SQL 2K and MDAC 2.6 SP2, yet I am still experiencing it: I have a SQL user specifically created to SELECT on 5 tables in one database. I have created an ODBC file DSN using that login/password. I create an Access DB, attempt to link to the five SQL tables using that DSN, using a trusted connection. The ODBC drivers ignore the users permissions, and...
2
6383
by: kathyk | last post by:
Hi All, I am using Access 2003. I have a function that I have been using to log on to linked tables using the system ODBC and it has been working great. Now I want to do the same thing using a file dsn that connect to a database using windows integrated security and I can't seem to get the syntax right. This is the only DAO code I use any more, is there an ADO equivalent? Please take a look at this tell me what's wrong, or suggest a...
3
3492
by: Niks | last post by:
Hi, I need to connect to SQL server Database using a System DSN. Can anyone tell me how to connect to SQL Server using DSN in ASP.NET (VB.Net). Using a Try Catch block. Does anyone know how to create a "filename.DSN" file. I know how to create a system DSN, but my N/W admin has asked me to create a DSN file to send him. which would be a file name with ".DSN" extension, so that he can place it on the server.
9
1408
by: Mike | last post by:
In my code i'm pointing to a SQL server name and SQL database name on the server, etc. Instead of that how can i point to a DSN connection on the web server that points to the SQL Server and DB?
13
3587
by: JIM.H. | last post by:
Hello, I have the following lines to read connection string from web.config; string cStr = ConfigurationSettings.AppSettings; SqlConnection sqlConn = new SqlConnection(cStr); this.sqlConnection1.ConnectionString = cStr; How can replace this with a DSN (ODBC connection) I defined in my current machine? Thanks,
4
3683
by: bytesbytes | last post by:
Hi, Im using VB6.0, Crystal report 10 and MSaccess Database. I was using Crystal report 6 and later upgraded to CR10. In VB6 i used DSN like .Connect = "DSN=DBName" & ";UID=admin;PWD=;" Now in CR10 i have created reports without using DSN in VB. Can any help how to use DSN in VB6.0 with CR10 or is there any method so that i no need to use DSN in the above said requirements. The code used for CR10 is Set Report = Appl.OpenReport(App.Path...
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10083
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.