怎么将char转换成MONEY各位高手帮帮小弟~
ssql = "insert into bk_tsrkb(isbn,bcid,bname,tszz,tszy,tsdj,cbrq,kb,bb,fbt,qtzrr,tszt,rksj,cbm,cbzrz,tsys,pubid) " _
& "values( ' " & Trim(txtISBN.Text) & " ', ' " & Trim(txtFLH.Text) & " ', ' " & Trim(txtZBT.Text) & " ', " _
& " ' " & Trim(txtDYZRZ.Text) & " ', ' " & Trim(txtZY.Text) & " ', Convert(Money, 'trim(txtDJ.Text) ') , " _
& " ' " & Trim(txtYear.Text) & "- " & Trim(txtMon.Text) & "- " & "1 " & " ', ' " & Trim(txtKB.Text) & " ', " _
& " ' " & Trim(txtBB.Text) & " ', ' " & Trim(txtFBT.Text) & " ', ' " & Trim(txtQTZRZ.Text) & " ', " _
& " ' " & Trim(txtZT.Text) & " ',getdate(), ' " & Trim(txtCBM.Text) & " ', ' " & Trim(txtCBZRZ.Text) & " ', ' " & Trim(txtYS.Text) & " ', ' " & Get_sPubid & " ') "
其中 tsdj字段是MONEY型的~ 相对应的插入 Convert(Money, 'trim(txtDJ.Text) ')
总是提示 无法将CHAR 转换成MONEY 语法错误~ 到底错在哪里了????
如果换成 Convert(Money, ' " & trim(txtDJ.Text) & " ')
总是提示 无法将VARCHAR转换成MONEY 请使用CONVERT函数~~~
求各位帮忙~~~~~~~
[解决办法]
跟前天问题一样
Convert(Money, 'trim(txtDJ.Text) ')----> Convert(Money, "&trim(txtDJ.Text)& ")