I am trying to get an App to connect to an oracle database and found a lovely tutorial here: Tutorial is here.
I am not a programmer, but have plugged in into my program and I am getting an error message
argument 1: cannot convert from'void' to 'string'
in the bit where I am calling the connect and query method. Any advice on how to fix the issue?
The problem is from when I try to call the ConnectAndQuery method to show the results.
public partial class UpdatePOsNewUser : Form
int sum = 0;
private static string CONNECTION_STRING =
"User Id=MyUser;Password=MyPassword;Data Source=(DESCRIPTION=" +
// This really didn't need to be in its own method, but it makes it easier
// to make changes if you want to try different things such as
// promting the user for credentials, etc.
static private string GetConnectionString()
// To avoid storing the connection string in your code,
// you can retrieve it from a configuration file.
return "Data Source=myserver.server.com;Persist Security Info=True;" +
// This will open the connection and query the database
static private void ConnectAndQuery()
string connectionString = GetConnectionString();
using (OracleConnection connection = new O