VB6.0中写SQL语句,怎样去除字段前后的空格?
rs1.Open "select * from db_mrp where rtrim(存货编码) ='" & RTrim(XL.Cells(i, 11)) & "'and rtrim(宽度)='" & RTrim(XL.Cells(i, 12)) & "'", cnn, adOpenKeyset, adLockOptimistic如以上语句,改成以下语句,会出错.
rs1.Open "select * from db_mrp where trim(存货编码) ='" & Trim(XL.Cells(i, 11)) & "'and trim(宽度)='" & RTrim(XL.Cells(i, 12)) & "'", cnn, adOpenKeyset, adLockOptimistic
应该怎样改呢?