Problem to connect to oracle with c#

i have an application
it was develop under a windows vista machine...
at my work , my boss change me to a desktop with windows xp

the same application still run fine at windows vista machine, but it dont run at windows xp

My platform is in spanish...
the error say ""Error Message: [IM002][Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified."

using System;
using System.Data;
using System.Data.OleDb;
using System.Data.ProviderBase;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Data.Odbc;
using System.Web.Security;
using System.Data.OleDb;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Oracle.DataAccess.Client;
 
 
public partial class ConsCOB : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
     {
        OdbcConnection cn;
             cn= new OdbcConnection("Driver={Microsoft ODBC for Oracle};Server=orcl;UID=system;PWD=oracleone;");
     OdbcCommand cmd;
        string MyString;
     MyString = "SELECT RPSDOC, RPSDCT, RPDOC, RPDCT, RPAN8,RPAAP, RPODCT, RPDGJ, RPDIVJ, RPDSVJ, RPDDJ, RPDDNJ, RPDICJ";
     MyString = MyString + " FROM PRODDTA.F03B11 WHERE RPDOC=591";
        cmd=new OdbcCommand(MyString,cn);
        cn.Open();
     OdbcDataReader reader = cmd .ExecuteReader ();
     TextBox2.Text = "";
     while (reader.Read ())
     {
         TextBox2.Text = TextBox2.Text + "SDOC=" + reader.GetString(0);
         TextBox2.Text = TextBox2.Text + "SDCT=" + reader.GetString(1);
         TextBox2.Text = TextBox2.Text + "DOC=" + reader.GetString(2);
         TextBox2.Text = TextBox2.Text + "DCT=" + reader.GetString(3);
         TextBox2.Text = TextBox2.Text + "ODOC=" + reader.GetString(4);
         TextBox2.Text = TextBox2.Text + "AAP=" + reader.GetString(5);
         TextBox2.Text = TextBox2.Text + "ODCT=" + reader.GetString(6);
         TextBox2.Text = TextBox2.Text + "DGJ=" + reader.GetString(7);
         TextBox2.Text = TextBox2.Text + "DIVJ=" + reader.GetString(8);
         TextBox2.Text = TextBox2.Text + "DSVJ=" + reader.GetString(9);
         TextBox2.Text = TextBox2.Text + "DDJ=" + reader.GetString(10);
         TextBox2.Text = TextBox2.Text + "DDNJ=" + reader.GetString(11);
         TextBox2.Text = TextBox2.Text + "DICJ=" + reader.GetString(12);
         Console.WriteLine("{0}",reader.GetString(1));
     }
     TextBox1 .Text = "Connected";
     string oCMD = "SELECT ILDOC, ILDCT, ILTRDJ, ILDGL FROM PRODDTA.F4111 WHERE ILDCT='MA' AND ILDOC>=103035 AND ILDOC<=103036;";
      } 	
    }
}

Open in new window

FAIL-OPEN-ORACLE.JPG
tenriquez39EngenierAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mpf1748Commented:
You need to set up your ODBC Data Source on the new machine. See All Progams | Administrative Tools | Data Sources (ODBC) or Control Panel | Administrative Tools | Data Sources (ODBC). Use the same server name, database name, user name, etc as the old machine had.
0
mpf1748Commented:
Actually, that might not be the problem, because you are not using a named ODBC Data Source. However, you might need to install the ODBC for Oracle driver or check that it is installed in the same location that I mentioned in my previous post.
0
tenriquez39EngenierAuthor Commented:
thanks mpf1748

yes i think it some like driver odbc for oracle
cause in laptop i see odbc for oracle version 6.00.6001.18000

in desktop i have version 2.575.1132


i dont know where find odbc for oracle that version
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

mpf1748Commented:
It looks like from your code that you are using Microsoft ODBC for Oracle. I searched and found: http://support.microsoft.com/kb/175018, but it looks like its version 2.5, which is what you appear to have though. Is "orcl" an actual server name on the network or is this the DSN that I was referring to in my first post?
0
tenriquez39EngenierAuthor Commented:
orcl is the name of the SID

my server name is ENTERPRISE

the curious ...is it run fine in other machine

i have also DSN craeted ....this run fine
0
tenriquez39EngenierAuthor Commented:
i solve it with dns, but i have a dude......wich is better talking about performance to read data

i use it code and run fine :

{
        OdbcConnection cn;
        OdbcCommand cmd;
        string MyString;

        MyString="Select * from Customers";
        cn= new OdbcConnection("dsn=myDSN;UID=myUid;PWD=myPwd;");

        cmd=new OdbcCommand(MyString,cn);
        cn.Open();
        MessageBox.Show("Connected");
        cn.Close();
      }          
0
ee_autoCommented:
Question PAQ'd, 250 points refunded, and stored in the solution database.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.