Click here to Skip to main content
15,888,579 members
Home / Discussions / C#
   

C#

 
QuestionRegistering SQL Dependency again from onchange event Pin
Tridip Bhattacharjee24-Apr-15 4:48
professionalTridip Bhattacharjee24-Apr-15 4:48 
QuestionSql Dependency onchange event not firing every time c# Pin
Tridip Bhattacharjee24-Apr-15 3:48
professionalTridip Bhattacharjee24-Apr-15 3:48 
QuestionUnable to connect Oracle database from C# Pin
meeram3924-Apr-15 3:47
professionalmeeram3924-Apr-15 3:47 
AnswerRe: Unable to connect Oracle database from C# Pin
Dave Kreskowiak24-Apr-15 4:03
mveDave Kreskowiak24-Apr-15 4:03 
GeneralRe: Unable to connect Oracle database from C# Pin
meeram3924-Apr-15 14:53
professionalmeeram3924-Apr-15 14:53 
GeneralRe: Unable to connect Oracle database from C# Pin
Dave Kreskowiak24-Apr-15 17:21
mveDave Kreskowiak24-Apr-15 17:21 
GeneralRe: Unable to connect Oracle database from C# Pin
meeram3924-Apr-15 19:28
professionalmeeram3924-Apr-15 19:28 
GeneralRe: Unable to connect Oracle database from C# Pin
meeram3925-Apr-15 0:39
professionalmeeram3925-Apr-15 0:39 
I removed everything and installed fresh everything in C drive itself. So I got tnsnames and sqlnames ora files automatically. I tried ping from DOS prompt using ping and tnsping which was also successful. However, When I tried from dotnet, I am getting an error message, "The procedure entry point ons_init_wconfig_ctx could not be loaded in the dynamic link library oraons.dll". I have installed win64_11gR2_client in Windows 7, and the dotnet version is Visual Studio 2012 Enterprise Edition (Trial).

My code is as below:
C#
 private void ConnectOracleDB()
        {
            string sqlstring = string.Empty;
            Logger myLogger = new Logger();
            

            string myConnectionString = GenerateConnectionString();
            OracleConnection myConnection = new OracleConnection();
            myConnection.ConnectionString = myConnectionString;

            try
            {
                myLogger.AddtoLogFile("Trying to connect Oracle DB", "Page Load");
                myConnection.Open();                
            }
            catch (Exception ex)
            {
                myLogger.AddtoLogFile(ex.Message, "Connecting to Oracle DB");
            }

            //execute queries
            myConnection.Close();

        }

private string GenerateConnectionString()
        {
            return "Data Source=( DESCRIPTION = ( ADDRESS_LIST = ( ADDRESS = ( PROTOCOL = TCP )( HOST = {server ip} )( PORT = 1521 ) ) )( CONNECT_DATA = ( SERVER = DEDICATED )( SERVICE_NAME = {db name}) ) ); User Id= abcd; Password = 1234;";
        }


Update:
I fixed this now, as I copied the same to the bin directory on the Application root directory. But now another error comes as "Object doesn't exist" .. Cry | :(( Cry | :((

modified 25-Apr-15 9:30am.

GeneralRe: Unable to connect Oracle database from C# Pin
Dave Kreskowiak25-Apr-15 3:42
mveDave Kreskowiak25-Apr-15 3:42 
GeneralRe: Unable to connect Oracle database from C# Pin
meeram3925-Apr-15 5:46
professionalmeeram3925-Apr-15 5:46 
QuestionHow to Open the Docx File in Silverlight Pin
Hrishikesh Shivacharan24-Apr-15 1:17
Hrishikesh Shivacharan24-Apr-15 1:17 
AnswerRe: How to Open the Docx File in Silverlight Pin
Dave Kreskowiak24-Apr-15 3:37
mveDave Kreskowiak24-Apr-15 3:37 
AnswerRe: How to Open the Docx File in Silverlight Pin
Brisingr Aerowing24-Apr-15 6:31
professionalBrisingr Aerowing24-Apr-15 6:31 
AnswerRe: How to Open the Docx File in Silverlight Pin
Mycroft Holmes24-Apr-15 13:35
professionalMycroft Holmes24-Apr-15 13:35 
GeneralRe: How to Open the Docx File in Silverlight Pin
Hrishikesh Shivacharan6-May-15 21:20
Hrishikesh Shivacharan6-May-15 21:20 
GeneralRe: How to Open the Docx File in Silverlight Pin
Mycroft Holmes6-May-15 22:10
professionalMycroft Holmes6-May-15 22:10 
QuestionAdmin questions about Microsoft exam 70-483 Pin
CRobert45623-Apr-15 4:57
CRobert45623-Apr-15 4:57 
AnswerRe: Admin questions about Microsoft exam 70-483 Pin
Dave Kreskowiak23-Apr-15 9:39
mveDave Kreskowiak23-Apr-15 9:39 
GeneralRe: Admin questions about Microsoft exam 70-483 Pin
Mycroft Holmes23-Apr-15 12:56
professionalMycroft Holmes23-Apr-15 12:56 
QuestionHow to compare a sql server table field with a csv field and display what is not in the sql table. Pin
Norris Chappell23-Apr-15 4:33
Norris Chappell23-Apr-15 4:33 
AnswerRe: How to compare a sql server table field with a csv field and display what is not in the sql table. Pin
Sascha Lefèvre23-Apr-15 4:49
professionalSascha Lefèvre23-Apr-15 4:49 
GeneralRe: How to compare a sql server table field with a csv field and display what is not in the sql table. Pin
Norris Chappell23-Apr-15 5:44
Norris Chappell23-Apr-15 5:44 
GeneralRe: How to compare a sql server table field with a csv field and display what is not in the sql table. Pin
Sascha Lefèvre23-Apr-15 5:56
professionalSascha Lefèvre23-Apr-15 5:56 
GeneralRe: How to compare a sql server table field with a csv field and display what is not in the sql table. Pin
Norris Chappell23-Apr-15 6:20
Norris Chappell23-Apr-15 6:20 
GeneralRe: How to compare a sql server table field with a csv field and display what is not in the sql table. Pin
Kevin Marois23-Apr-15 6:37
professionalKevin Marois23-Apr-15 6:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.