我用odbc连接,在odbc数据源中建立了一个名为YYMIS的数据源。
在asp.net(c#)中用如下方法连接:
/*****************************************************
OdbcConnection objConn = new OdbcConnection();
objConn.ConnectionString = "DRIVER={Oracle ODBC Driver};UID=www;PWD=asd;DBQ=YYMIS.world;DBA=W;";
objConn.Open();
******************************************************/
当单步执行到objconn.open()时,出现如下错误:
/*****************************************************
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
******************************************************/
我将objConn.ConnectionString改为:
objConn.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=YYMIS.world;Uid=www;Pwd=asd";
或者objConn.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=YYMIS;Uid=www;Pwd=asd";
也同样出错。谁知道原因吗?我已经郁闷了一个下午了,试了网上的很多方法都不行。
高分求助!!!!!!
在asp.net(c#)中用如下方法连接:
/*****************************************************
OdbcConnection objConn = new OdbcConnection();
objConn.ConnectionString = "DRIVER={Oracle ODBC Driver};UID=www;PWD=asd;DBQ=YYMIS.world;DBA=W;";
objConn.Open();
******************************************************/
当单步执行到objconn.open()时,出现如下错误:
/*****************************************************
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
******************************************************/
我将objConn.ConnectionString改为:
objConn.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=YYMIS.world;Uid=www;Pwd=asd";
或者objConn.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=YYMIS;Uid=www;Pwd=asd";
也同样出错。谁知道原因吗?我已经郁闷了一个下午了,试了网上的很多方法都不行。
高分求助!!!!!!
\oracle\ora92\bin
数据源名没找到 服务器 是否装了 ora9.2