Hi,

I am developing a small tool using Visual c#2005 which is used to get the
Oracle Schema version.  When I tested it in my machine it works fine. When
my boss tested the same in his machine it brings out the message TNS-NO
LISTENER.  He says listener is running in his machine & says the problem is
in the code (He is an Oracle DBA and is in this field for nearly 15 years).
The code is just a few lines & I think there is nothing wrong in it.   I
don't know how to solve this problem.  I have tested it in my machine at
home, it works good there also.

I am a novice when it comes to Oracle & wondering where the problem could
be.  Please find below the code I have used.




 private void VERSIONANALYZER()

        {

            try

            {

//Connection method :1

sconnect = "Server = Servername; Uid = username; password = password";



//Connection method :2



//sconnect = "user id = username e; password = password;data source = //
Servername;";                                     conn.ConnectionString =
sconnect.ToString();

                try

                {

                    string squery = "SELECT VERSION FROM VERSIONS";

                    cmd = new OracleCommand(squery, conn);

                    cmd.Connection = conn;

                    this.conn.Open();

                    dr = cmd.ExecuteReader();

                    bool abc;

                    abc = dr.Read();

                    if (abc == true)

                    {

string sversion = "Oracle Schema Version : " + dr["VERSION"].ToString();



                     MessageBox.Show(sversion.ToString());

                    }

                }

                catch (Exception EXE)

                {

                    MessageBox.Show(EXE.Message, "VERSION ANALYZER",
MessageBoxButtons.OK, MessageBoxIcon.Warning);

                }



                finally

                {

                    this.conn.Close();

                }

            }



        }

I will be really thankful if some one guide me in solving the issue.

-- 
Thanks & Regards,
Karthikeyan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to