Problems with Excel as an ODBC source



I have a problem with connecting to Excel as an ODBC source.


If connection to Excel has been made and an attempt is made to send an email, Adobe will crash with no error.

Also if i start with sending an email with Adobe, a connection to Excel as an ODBC source can not be opened.

These errors does not happen when using an sql server as an ODBC source.

I tried a lot of different approaches, but i am not able to solve it. Everything is updated to the latest versions.

Working Code, but crashes Adobe when trying to send email.

//Open ODBC connection to Excel Sheet named "Item". Connection Name: "Fuel-Item"

try {
var nIndex = 0;
while(xfa.sourceSet.nodes.item(nIndex).name != "Fuel-Item"){nIndex++;}

var oDB = xfa.sourceSet.nodes.item(nIndex).clone(1);

oDB.nodes.item(1).query.setAttribute("text", "commandType");

sBOFBackup = oDB.nodes.item(1).query.recordSet.getAttribute("bofAction");
sEOFBackup = oDB.nodes.item(1).query.recordSet.getAttribute("eofAction");

oDB.nodes.item(1).query.recordSet.setAttribute("stayBOF", "bofAction");
oDB.nodes.item(1).query.recordSet.setAttribute("stayEOF", "eofAction");

oDB.nodes.item(1) = "SELECT Description FROM [Item]";;

//Read records

oDB.nodes.item(1).query.recordSet.setAttribute(sBOFBackup, "bofAction");
oDB.nodes.item(1).query.recordSet.setAttribute(sEOFBackup, "eofAction");


}catch(err){"Error\n\n"+err, "Debugging", 3);


//Send mail
var cTo="";
var cSubject="Hello";
var cMsg="World";{cURL:"mailto: "+ cTo +"?subject=" + cSubject+"&body=" + cMsg,cSubmitAs:"PDF",cCharset:"utf-8"});

Accepted Solutions (0)

Answers (0)