Forum guidelines
AuthorQuestion
Connection with database
Posted By shakila jannat on 20 Jun 2013
How to connect with Oracle database throw Asp.net windows application.
i can not use TNS file or oracle databse  in my client pc. how can i do this ??
Please help .

AuthorReply
Re: Connection with database
Posted By Sanjeeb Lenka on 20 Jun 2013  
check below link:

http://docs.oracle.com/cd/B28359_01/appdev.111/b28844/using_aspnt.htm#autoId0

 download it:

http://www.oracle.com/technetwork/developer-tools/visual-studio/overview/index.html

mark it as answered if its help you.

"If you Dream it You can do it"
Re: Connection with database
Posted By Pankaj Pandey on 20 Jun 2013  
try one of these

Using TNS

 
Data Source=TORCL;User Id=myUsername;Password=myPassword;

Using integrated security

 
Data Source=TORCL;Integrated Security=SSPI;

Using ODP.NET without tnsnames.ora

 

Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;
Password=myPassword;

Thanks Pankaj Pandey(Cobra)
Re: Connection with database
Posted By shakila jannat on 20 Jun 2013  
Thanx pankaj bt when i use
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername; Password=myPassword;
this code in my app.config file it gives me
error:Object reference not set to an instance of an object what should i do???
:(

Re: Connection with database
Posted By Pankaj Pandey on 20 Jun 2013  
do you try it directly without app.config file?

if yes then write the result,,is it working or not when you put it direct in your pgmm,
write the code that you are using ..


Thanks Pankaj Pandey(Cobra)

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.