才能将日期+时间放进 SQL表中的datetime字段中???
strSQl = _
"INSERT INTO PIPLE(id,startId,Gxid,Designer,stuff,remark,EndID,diameter,xgry,xgrq)" & vbCrLf _
& "VALUES(:ID,:STARTID,:GXID,:Designer,:stuff,:remark,:ENDID,:diameter,:xgry,:xgrq)"
strSQl = Replace(strSQl, ":ID", "'" & GdbhT.Text & "'")
strSQl = Replace(strSQl, ":STARTID", "'" & sjdbhT.Text & "'")
strSQl = Replace(strSQl, ":GXID", "'" & Text1.Text & "'")
strSQl = Replace(strSQl, ":Designer", "'" & sjdwT.Text & "'")
strSQl = Replace(strSQl, ":stuff", "'" & czCombo1.Text & "'")
strSQl = Replace(strSQl, ":remark", "'" & beizhuT.Text & "'")
strSQl = Replace(strSQl, ":ENDID", "'" & xjdbhT.Text & "'")
strSQl = Replace(strSQl, ":diameter", kjCombo1.Text)
strSQl = Replace(strSQl, ":xgry", "'" & frmmain.stbName.Panels(5).Text & "'")
'strSQl = Replace(strSQl, ":xgrq", getdate())
最后一句出错!!!