REST API Print Error: [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I am trying to save a PDF file using the PrintBTW Action view the rest api and am having trouble. I am not sure where/how to specify my database connection? I am trying to reference the .XML file created from the connection. I have tried several combinations of DatabaseOverrides and NamedDataSources values and continuously get this error. I am using the following json:
"PrintBTWAction": {
"DocumentFile": "C:\\Users\\My User \\BarTender\\BarTender Documents\\sample_material_label.btw",
"Printer": "PDF",
"PrintToFileFolder" : "C:\\Users\\My User\\Desktop\\Bartender\\out",
"PrintToFileFileName": "material_label.pdf",
"Copies": 1,
"RecordRange": "1...",
"MediaHandling": {
"Action": "PageBreak",
"Occurrence": "AfterEveryRecord"
},
"VerifyPrintJobIsComplete": true,
"PrintJobTimeout": -1,
"DatabaseOverrides": [
{
"Name": "DbConnection",
"FileTarget": "C:\\ProgramData\\Seagull\\Database Connections\\DbConnection.xml"
} ],
"NamedDataSources": {
"NamedDS1": "C:\\ProgramData\\Seagull\\Database Connections\\DbConnection.xml"
},
"QueryPrompts": [
{
"Name": "IDQueryPrompt",
"Value": 123456
} ],
"ReturnPrintData": true,
"ReturnPrintSummary": true,
"ReturnLabelData": true,
"Name": "Print BTW"
}
Full Error:
{ "Id": "4451dfd4-dcab-45b9-9019-d878136776ed", "Status": "Faulted", "StatusUrl": "http://localhost:5159/api/actions/4451dfd4-dcab-45b9-9019-d878136776ed", "Messages": [ "[5/1/2024 4:38:37 PM]\t[Error]\tThe 'sample_material_label.btw' print job did not complete due to the following error: Print Job Aborted. The record set could not be created due to the following:\r\n\r\nERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified", "[5/1/2024 4:38:37 PM]\t[Information]\tExecuting the 'Print BTW' action." ] }
0
-
James
★ BarTender Hero ★
Note, not really related to this XML, however, if getting this error on an ODBC connection. Do not use the "User DSN" connection but setup a System DSN.
0
请先登录再写评论。
评论
1 条评论