Connection string (modified the IP)
user id=TYC_DATA;password=********;server=1.1.1.1;home=oraodac11g_home1;direct=True;sid=CMCPPRL;persist security info=True
Code: Select all
try
{
// Create the command.
System.Data.Common.DbCommand command = entities.Connection.CreateCommand();
//command.CommandText = "SELECT PATIENT_MEDICATION_SEQ.NEXTVAL FROM TYC_DATA.DUAL";
command.CommandText = "select detail_id from TYC_DATA.pharmacy_order_detail where detail_id = 10091666";
command.CommandType = CommandType.Text;
// Open the connection.
entities.Connection.Open();
// Retrieve the data.
string s = (string)command.ExecuteScalar();
// System.Data.Common.DbDataReader reader = command.ExecuteReader();
//while (reader.Read())
//{
// NextValue = Convert.ToInt32(reader[0]);
//}
}
catch (Exception ex)
{
Console.WriteLine("Exception.Message: {0}", ex.Message);
}
{"'TYC_DATA.pharmacy_order_detail' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near multipart identifier, line 1, column 23."}