Click here to Skip to main content
15,918,889 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HOw to connect with oracle database using asp.net widows application??
can not use database in my client pc or any oracle TNS in client pc .connect with server only??how can i do this connection??
Posted

Check bellow link

http://www.oracle.com/technetwork/articles/dotnet/cook-masteringdotnet-090821.html
 
Share this answer
 
Try this,

C#
string ConnectionString = "Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = @fill_IP)(PORT = @fill_Port)) ) (CONNECT_DATA = (SERVICE_NAME = @fill_servicename) (INSTANCE_NAME = @fill_InstanceName) (GLOBAL_NAME = @fill_DatabaseName))); user id=@fill_UserId; password=@fill_Password; Connection Timeout=360";

OracleConnection con = new OracleConnection(ConnectionString );
con.open();
 
Share this answer
 
v2
Comments
shakilajannat 20-Jun-13 2:57am    
<add name="ORADB" providername="OraOLEDB.Oracle" connectionstring="Data Source=( DESCRIPTION = ( ADDRESS_LIST = ( ADDRESS = ( PROTOCOL = TCP )( HOST = {@IP} )( PORT = {1521} ) ) )( CONNECT_DATA = ( SERVER = DEDICATED )( SERVICE_NAME = {@ServiceName } ) ) ); User Id= {@User}; Password =@Pass;">
Give me error Object reference not set to an instance of an object.??
Alexander andri 20-Jun-13 3:06am    
Check you query, compare you query column with code column.
Must be same.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900