473,657 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What do I have to write in OracleConnectio n string for "Data Source" ?

I tried to connect to an existing Oracle Database with the following ConnectionStrin g:

using System.Data.Ora cleClient; // + Added Reference "System.Data.Or acleClient"

string cs = "Data Source=XE;User Id=karl;Passwor d=mypasswd";
connection = new OracleConnectio n(cs);
connection.Open ();

This code yields an "Invalid argument" ORA-12532 error.

Why ?

Even when I switch to

using Oracle.DataAcce ss.Client; // + Added Reference "Oracle.DataAcc ess"

I got the same error.

"XE" is the name of the Oracle Express Database.

What else can I do ?
Does the sequence of Data Source, User Id and Password in the connection string matter ?

Do I have to declare the "Data Source" somewhere else (beside the Reference)?

Werner

May 30 '07 #1
2 9605
Hi,

Check http://www.connectionstrings.com/

"Werner Sammer" <we****@yahoo.d ewrote in message
news:46******** *************** @newsspool3.arc or-online.net...
>I tried to connect to an existing Oracle Database with the following
ConnectionStri ng:

using System.Data.Ora cleClient; // + Added Reference
"System.Data.Or acleClient"

string cs = "Data Source=XE;User Id=karl;Passwor d=mypasswd";
connection = new OracleConnectio n(cs);
connection.Open ();

This code yields an "Invalid argument" ORA-12532 error.

Why ?

Even when I switch to

using Oracle.DataAcce ss.Client; // + Added Reference "Oracle.DataAcc ess"

I got the same error.

"XE" is the name of the Oracle Express Database.

What else can I do ?
Does the sequence of Data Source, User Id and Password in the connection
string matter ?

Do I have to declare the "Data Source" somewhere else (beside the
Reference)?

Werner

May 30 '07 #2
Werner Sammer wrote:
I tried to connect to an existing Oracle Database with the following ConnectionStrin g:

using System.Data.Ora cleClient; // + Added Reference "System.Data.Or acleClient"

string cs = "Data Source=XE;User Id=karl;Passwor d=mypasswd";
connection = new OracleConnectio n(cs);
connection.Open ();

This code yields an "Invalid argument" ORA-12532 error.

Why ?

Even when I switch to

using Oracle.DataAcce ss.Client; // + Added Reference "Oracle.DataAcc ess"

I got the same error.

"XE" is the name of the Oracle Express Database.

What else can I do ?
Does the sequence of Data Source, User Id and Password in the connection string matter ?

Do I have to declare the "Data Source" somewhere else (beside the Reference)?

Werner

1. in web.config:

<connectionStri ngs>
<add name="jamieOrac le" connectionStrin g="user
id=jamie;passwo rd=jamie;data
source=(DESCRIP TION=(ADDRESS=( PROTOCOL=tcp)(H OST=jamieamd)(P ORT=1521))(CONN ECT_DATA=(SERVI CE_NAME=jamie)) )"/>
</connectionStrin gs>

2. in your app:

// create an Oracle data provider connection:
string connStr =
ConfigurationMa nager.Connectio nStrings["jamieOracl e"].ConnectionStri ng;
OracleConnectio n con = new OracleConnectio n(connStr);

May 30 '07 #3

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

Similar topics

3
4691
by: 21novembre | last post by:
Hi all, I made a question several days before to describe my strange trouble of mysqldump. But I still can't figour it out. Well, I just want to ask another question whether I could just backup my databases by copying the data folder to some place? Then if I meet some disaster, could I just copy the backup folder back to recover my databases? Thank you. Zh.y
6
2013
by: kobu.selva | last post by:
I was recently part of a little debate on the issue of whether constants and string literals are considered "data objects" in C. I'm more confused now than before. I was always under the understanding that only "named" storage areas(from the standard) were data objects. Since constants and string literals don't have lvalues, they can't be data objects. Yet, I was shown the first page of chapter 2 in K&R2, which states that variables...
2
4903
by: jerry.ranch | last post by:
I've been using row source with the QBE for my list and combo boxes..when would I use control source? jerry
0
4999
by: saraDotNet | last post by:
hi everybody , I'm a beginner student in vb.net,and I'm working on a very small project as a homework,and I've some questions which I ought to search for their solutions via any source . My question, I need to make an (Update )button in most of my VB forms,which enable me to update any row elements in the datasource in Access through each form , for example: I've a form about CustomersData as...
2
2108
by: joe.kimbler | last post by:
What is the best way to handle updates in databases with each release of a software package? I used to work on an accounting package in FoxPro that had a "Data Dictionary" and as your code required changes to the database per release, you'd update the Data Dictionary. When you wanted to create a new database, it would create it completely from the data dictionary. If you already had a functional database and the new release required...
0
1756
by: Anthony Paul | last post by:
Hello everyone! I have been looking for information regarding the SOA tenet of decoupling the client interface from the web service interface. I understand the value of not sharing a contract based on a class type; instead, a contract based on the data is what we should be implementing. However, information on how to properly implement this in .NET 2.0 is pretty scarce. I have been fiddling around with a simple web-service and client I
1
1489
by: Rob Meade | last post by:
Hi all, I have my own collection own which implements ienumerable and ienumator. I was recently using a GridView and I was prompted that I could not turn on paging because the data source (my collection) was not data pageable. I subsequently added a property to my collection to return the data as a datatable and all was good, however, I would much prefer to not do this, and keep the source as my collection.
0
4056
by: wildman | last post by:
Trying to read XML files from SSIS and load into SQL Server. I tested this before and it was working before I placed in a forevery contrainer. also, my simple xml file had to be retyped cause I deleted by accident.. Getting this error: The component "XML Source" (108) was unable to read the XML data.
4
6701
by: santhanalakshmi | last post by:
Hi, In ODBC, i given data source name and the test connection is also successful. But i don't know, why i am facing this error DBI connect('wwwdsn','webid',...) failed: Data source name not found and no default driver specified (SQL-IM002) at C:/Program Files/Apache Group/Apache2/cgi-bin/auth/studpass.cgi line 20, referer: http://localhost/student.html Can not connect: Data source name not found and no default driver...
0
8315
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
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8734
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
8508
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
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7341
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...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.