在vba

时间:2016-09-01 09:00:33

标签: mysql vba excel-vba excel

我有一个插入MySQL查询太长而且我得到错误可能是因为我没有正确地破坏它们。

所以这里是查询

sq = "Insert into trainer (`ID`, `Site work being carried out`, `Manufacturers Serial Number or VIN`,`Platform`,`Type of Equipment`,`Equipment Sub-Grouping`,`Equipment Group`,`Equipment Description`,`NSN / Part Number`,`Manufacturer`,`Model`,`Date of Manufacture`,`Base`,`On Base Location`,`Serial Number`,`Last Odometer or Hour Meter Reading`,`Current Status`,`Equipment Arrival Date`,`Equipment ECD (Estimated Completion Date)`,`Revised Estimated Delivery Date`,`Equipment ACD  (Actual Equipment Completion Date)`,`Delivered Date`,`Equipment In Program for Repair or Refurbishment`,`Remarks`,`Date Requested Induction of Equipment`,`Date Equipment Inducted into Site / Program`,`Diagnosing Start Date`,`Diagnosing End Date`,`Date Price Parts Sourcing Start`,`Date Price Parts Sourcing End`,`Date NTE Process Starts`,`Induction Cycle Process Complete Date`,`Date Proposal Sent `, `S O issued Date`,`S O No`,`Date PO Request Sent to Procurement`,`Date Foregin / International Parts Arrived at Customs`,`Date Last Part(s) Recvd at Site (last part recvd to start work)`,`Date Repair Started (After last part was recvd at site)`,`Date Repair Completed`,`Local Parts Ordered`,`Local Parts Received`,`Foreign / Int Parts Ordered`,`Foreign / Int Parts Received`) values ('" & prr.value & "','" & sitecombo.value & "','" & vin.value & "','" & ComboBox2.value & "','" & ComboBox3.value & "','" & ComboBox4.value & "','" & eqgrp.value & "','" & desc.value & "','" & nsn.value & "','" & mfg.value & "','" & mdl.value & "','" & mfgyr.value & "','" & rsafbase.value & " ','" & onbaseloc.value & "','" & rsafsr.value & "','" & odomtr.value & "','" & status.value & "','" & arvldt.value & "','" & ecd.value & "','" & redd.value & "','" & acd.value & "','" & deldt.value & "','" & vin.value & "','" & rprrfb.value & "','" & remarks.value & "','" & indreq.value & "','" & inddt.value & "','" & digdt.value & "','" & digend.value & "','" & srcdt.value & "','" & srcend.value & "','" & ntedt.value & "','" & incend.value & "','" & nteprp.value & "','" & nteapp.value & "','" & nteend.value & "','" & sodt.value & "','" & sono.value & "','" & podt.value & "','" & farvl.value & "','" & lstpartrecdt.value & "','" & rprstrt.value & "','" & rprcom.value & "','" & lclord.value & "', '" & lclrec.value & "','" & ford.value & "','" & frec.value & "');"

有人可以帮我吗......

0 个答案:

没有答案