我正在寻找一种将记录输出到自定义文本文件的方法。关键是文本文件有两个部分: 1. 命令脚本 2. 数据记录 目的是将文件输出到 Watch 文件夹,标签软件将打开文件处理命令脚本并在标签上打印数据记录。我正在使用 Access 2010 前端和 SQL Server 2008 后端。文本文件在第 1 行和第 2 行使用脚本命令格式化,数据从第 3 行开始。下面是文本文件的示例:
%BTW% /AF="C:\ShippingLabelName.btw" /D="%Trigger File Name%" /PRN="LabelPrinterName" /R=3 /P /DD %END% "PackSlipNo","ShipLotNo"," Qty","CustRev","CustPartNo","ShipDate","CustPO","Describe","PartNo","SupplierNum","ID","MyQty","MyPartsPer","Dock","City" ,"UserDefined1","UserDefined2","UserDefined3","UserDefined4","SerialNum" "99007865",20120097,24402,"NONE","440510404",6/18/2012 0:00:00,"0203109703" ,"PINTLE","33949","9090551",9420,5,1000,"JRZ 2","圣特蕾莎",,,,,"150535"