473,503 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem in oracle database connection string

Hi, I'm trying to connect to my Oracle 10g Database

i m facing the problem of connection string, following code is that i use,
please tell me how to use the connection string for accessing the oracle
database from a remote location and from local machine, at both places i m
getting the problem. tell me how to set the server name, data sourse of a
remote server to acces tha data from a client on a diffrent machine.
I used this code:

protected Oracle.DataAccess.Client.OracleConnection con;

protected Oracle.DataAccess.Client.OracleCommand orcmd;

protected Oracle.DataAccess.Client.OracleDataReader orcreader;
private void Page_Load(object sender, System.EventArgs e)

{

string cmdQuery = "SELECT COMPANY_ID, COMPANY_Name FROM COMPANY_LIST_TEMP";

con.ConnectionString="Server=Sct-hasan;User Id=sys;Password=sa;Data
Source=TADB;";
orcmd= new Oracle.DataAccess.Client.OracleCommand(cmdQuery);

con.Open();

orcmd.Connection= con;

orcmd.CommandType=CommandType.Text;

orcreader= orcmd.ExecuteReader();

con.Close();

}

..................................................

thanx .bye
Mar 15 '06 #1
1 1800
Well you haven't explained the problem but I will tell you that you
don't need the server attribute in an oracle connection string. Just
make sure the DataSource attribute is a valid SID alias from either
your TNSNames.ora file or your Oracle NameServer.

Mar 15 '06 #2

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

Similar topics

2
8431
by: J.Bijleveld | last post by:
Hello colleagues, At this moment we have a real big problem using a .NET application with an Oracle database (v8.1.6). I hope someone has encountered this problem before and is able to help me...
0
4728
by: JWM | last post by:
I am trying to implement Oracle connection pooling for the following code, which was written by someone else. Here is my main question -- this java file creates code that is executed every hour,...
1
4703
by: Cliff Cooley | last post by:
Can anybody suggest what may be causing the following problem ? I have an ASP script that opens a connection to an Oracle database using a DSN connection string, such as : Set dbConn=...
1
9175
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
0
1688
by: Anonymous User | last post by:
Hi, I am working on a mobile application that consists of a number of handheld scanners, an Xml Web service and an Oracle 9i database in a highly secure environment. The .Net Compact Framework...
6
17703
by: Bala Nagarajan | last post by:
Hello, I am using Oracle 9i in my application and facing a problem with the connection string. In the datasource attribute of the connection string i had to specify an entry in "tnsnames.ora"...
5
5373
by: Michael Rudolph | last post by:
Hi newsgroup, I have an issue with the configuration of a DB2 federated database (WebSphere Information Integrator) in conjunction with the relational wrapper for Oracle on AIX. DB2 seems to not...
1
1316
by: noor | last post by:
Hi, I'm trying to connect to my Oracle 10g Database i m facing the problem of connection string, following code is that i use, please tell me how to use the connection string for accessing the...
7
4339
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
0
7205
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,...
0
7093
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...
0
7287
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,...
0
7348
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...
0
7467
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...
0
4685
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...
0
3175
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...
0
1519
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 ...
1
744
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.