Member Avatar for සශික

heY guys, I just step to oracle database system. so I'm new to this. I'm trying to make connection oracle db with vb.net. I saw below connection string on web. But I dont know it's keywords. So please teach me.

SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID))); uid=myUsername;pwd=myPassword; 

Firstly, if you didn't go there already, connectionstrings.com has all the info you will need on connections strings to the various databases.
Thats the connection string for omitting tnsnames, is that want you need?
Generally, the simpler version will work:
Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;Integrated Security=no;

Regardless, if you looked at the tnsnames format you'll see you only need to specify the data for MyHost and MyPort for the connection string to be valid. Change the protocol if required.
So the host name is the name of the server or it's IP address and the port is, well, the port its runnung on.

Member Avatar for සශික

hey I looked connectionstring.com already. But it doesn't help me.
so I try your connection string. It say invalid connection string
"con.ConnectionString = "Data Source=DS;User Id=SYSTEM;Password=oracle;Integrated Security=no;""

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.