List:MySQL on Win32« Previous MessageNext Message »
From:James Frankman Date:September 27 2005 4:12pm
Subject:Text Data Type, Data provider or other service returned an E_FAIL status
View as plain text  
I am getting this error on our production server but not our test server. ODBC driver is
version 3.5.06 on both. However, our test server is 4.1.14  and our production server is
4.1.8. I am getting the following error when trying to update a text datatype field using
ADO:

"Microsoft Cursor Engine (0x80004005)
Data provider or other service returned an E_FAIL status."

The error occurs when I call the ado update method (rs_update.update()). Could this be due
to production being an older version of MySQL or could it be something else? Below is the
system configuration and the code I am having trouble with.

Prod System Info:
Windows 2000
MDAC 2.8
MyODBC 3.5.06
MySQL 4.1.8

Test System Info:
Windows 2000
MDAC 2.8
MyODBC 3.5.06
MySQL 4.1.14

Code:

	Set RS_Update=createobject("adodb.recordset")
	RS_Update.cursorLocation=adUseClient
	set objXMLStream=createobject("adodb.stream")
	objXMLStream.type=adTypeText
	strSQL="select * from fbappuserprefs where appsys='" & me.appsys & "' and
userid='" & me.loginid & "'"
	RS_Update.open strsql, thispage.dataconn, adOpenStatic, adLockOptimistic
	if RS_Update.eof=true then
		rs_update.addNew	
		rs_update.fields("AppSys").value=me.appsys
		rs_update.fields("userid").value=me.loginid
	end if
	
	objXMLStream.open
	objXMLStream.writeText strXML
	objXMLStream.SetEOS
	objXMLStream.position = 0
	rs_Update.fields("xml")=objXMLStream.readText
	rs_update.update()
	objXMLStream.close()
	me.appPrefs=rs_Update.fields("xml")
	rs_update.close()
	Set objXMLStream=nothing
	Set RS_Update=nothing


Thread
Text Data Type, Data provider or other service returned an E_FAIL statusJames Frankman27 Sep