主题:  这种问题一般是什么出错

luolanxisi

职务:普通成员
等级:1
金币:0.0
发贴:156
#12002/10/23 17:09:07
我做了一个搜索引擎,可当提交搜索时就出现这个:
------------------------------------------------------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e07'
[Microsoft][ODBC Microsoft Access Driver] 内存溢出
/bbssearch.asp,行95
------------------------------------------------------------------------------------------------------
一般是什么问题会出现这样的出错提示?



5D荣誉版主

职务:普通成员
等级:1
金币:10.0
发贴:271
#22002/10/23 17:29:05
贴出代码看看?



5D荣誉版主

职务:普通成员
等级:1
金币:10.0
发贴:271
#32002/10/23 17:37:55
看看:
Existing code that successfully inserts records into a Date field in an Oracle table breaks when upgrading the Microsoft ODBC driver for Oracle from version 2.00.XXXX (Msorcl10.dll) to version 2.573.XXXX (Msorcl32.dll).

For example, the following insert statement works with the old version of Microsoft ODBC driver for Oracle (Msorcl10.dll):


.....
sSql = "INSERT INTO DATETEST valueS ('1988-12-01 10:23:03')"
conn.Execute sSql
However, with the newer version of the Microsoft ODBC driver for Oracle (Msorcl32.dll), the same insert statement gives the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC driver for Oracle][Oracle]ORA-01843: not a valid month
/Project/xxx.asp, line xx



CAUSE
In the old version of Microsoft ODBC driver for Oracle (Msorcl10.DLL), the ODBC driver does the following when it connects:


ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH:MI:SS'
This explains why an insert of a date field in the following format worked in the previous driver:

'YYYY-MM-DD HH:MI:SS'
With the Microsoft ODBC driver for Oracle (Msorcl32.dll), this feature has been removed. The new driver does not set the date format for Oracle date fields automatically.



RESOLUTION
To allow existing insert statements to work correctly with the new driver, modify your code as follows:


conn.Execute "ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH:MI:SS'"sSql = "INSERT INTO DATETEST valueS ('1988-12-01 10:23:03')"conn.Execute sSql



STATUS
This behavior is by design.

Additional query words:

Keywords : kbDatabase kbDriver kbMDAC kbODBC kbOracle kbVBp600 kbVC600 kbGrpVCDB kbGrpMDAC kbDSupport kbMDAC260
Issue type : kbprb
Technology :