I have been successfully using a linked server to upload data to a remote MySQL database. However, one of the fields I upload to has recently changed from a MySQL varchar type to a MySQL text type and I now have a problem because the upload fails with the message:
The OLE DB provider "MSDASQL" for linked server "WebRemote" reported an error. The provider reported an unexpected catastrophic failure.
This code (inserting NULL into the text item) works:
but neither of these work:
Any suggestions?
The local Tmp table that I've been using to experiment with has one row created as follows:
Thanks in advance.
The OLE DB provider "MSDASQL" for linked server "WebRemote" reported an error. The provider reported an unexpected catastrophic failure.
This code (inserting NULL into the text item) works:
Code:
INSERT OPENQUERY (WebRemote, 'SELECT TstTstCd,TstText,TstVarChar FROM Tst') SELECT TmpKey,NULL,'a' FROM Tmp
Code:
INSERT OPENQUERY (WebRemote, 'SELECT TstTstCd,TstText,TstVarChar FROM Tst') SELECT TmpKey,'a','a' FROM Tmp
INSERT OPENQUERY (WebRemote, 'SELECT TstTstCd,TstText,TstVarChar FROM Tst') SELECT TmpKey,cast('a' as text),'a' FROM Tmp
The local Tmp table that I've been using to experiment with has one row created as follows:
Code:
CREATE TABLE Tmp(
TmpKey varchar(15),
TmpBig text,
TmpBigger varchar(max)
)
INSERT Tmp VALUES ( 'a', 'a' + SPACE(998) + 'b',NULL)
Thanks in advance.