源程序
strsql = "INSERT INTO KDB_Payment(BillID,paybank,UserName,BoundType,PaymentDate,VoucherId,VoucherWord,ACCTSum,Amount,MoneyType,ExchangeRate,GroupName,Note) VALUES ( "
strsql = strsql & CInt(Trim(oItem.Text)) & "," _
& "'" & paybank & "'," _
& "'" & Trim(oItem.SubItems(1)) & "'," _
& "'" & Trim(oItem.SubItems(4)) & "'," _
& "'" & Voucherdate & "', " _
& "" & VoucherID & "," _
& "'" & VoucherWord & "'," _
& "" & ExchangeRate * Amount & "," _
& "" & Amount & "," _
& "'" & MoneyType & "'," _
& "" & ExchangeRate & "," _
& "'" & Trim(oItem.SubItems(8)) & "','" & Note & "')" '---问题在这一行
MsgBox strsql
connPay.Execute strsql
在变量 note的值为""时,程序运行无误;有值时MsgBox 出来的字符无问题,但在监视变量工具中查看的值中note变量的值都被截掉了。是不是监视器对字符型变量有大小限制?程序错语提示输出:
Err.Number -2147217833
Err.HelpFile "C:\WINNT\Help\VBENLR98.CHM"
Err.Description "String or binary data would be truncated."
Err.HelpContext 1000440
Err.Source "Microsoft OLE DB Provider for SQL Server"
vb提示错误
实时错误 '2147217833 (80040e57)'
String or binary data world be truncated.
strsql = "INSERT INTO KDB_Payment(BillID,paybank,UserName,BoundType,PaymentDate,VoucherId,VoucherWord,ACCTSum,Amount,MoneyType,ExchangeRate,GroupName,Note) VALUES ( "
strsql = strsql & CInt(Trim(oItem.Text)) & "," _
& "'" & paybank & "'," _
& "'" & Trim(oItem.SubItems(1)) & "'," _
& "'" & Trim(oItem.SubItems(4)) & "'," _
& "'" & Voucherdate & "', " _
& "" & VoucherID & "," _
& "'" & VoucherWord & "'," _
& "" & ExchangeRate * Amount & "," _
& "" & Amount & "," _
& "'" & MoneyType & "'," _
& "" & ExchangeRate & "," _
& "'" & Trim(oItem.SubItems(8)) & "','" & Note & "')" '---问题在这一行
MsgBox strsql
connPay.Execute strsql
在变量 note的值为""时,程序运行无误;有值时MsgBox 出来的字符无问题,但在监视变量工具中查看的值中note变量的值都被截掉了。是不是监视器对字符型变量有大小限制?程序错语提示输出:
Err.Number -2147217833
Err.HelpFile "C:\WINNT\Help\VBENLR98.CHM"
Err.Description "String or binary data would be truncated."
Err.HelpContext 1000440
Err.Source "Microsoft OLE DB Provider for SQL Server"
vb提示错误
实时错误 '2147217833 (80040e57)'
String or binary data world be truncated.
解决方案 »
- subform的添加数据操作
- vb6 double相减
- vb中如何读取远程列表txt文本文件
- 请教,如何在Pivot Table中将原先默认Data Fields纵向显示用VB代码更改为横向显示。
- 自动编号问题
- 请问:VB中怎么调用DLL文件?VB的COM组件开发是怎么做的,希望能给个详细的方法
- 一个exe程序,是用vb6编写的,调用了一个dll里的函数,smartcheck能看出调用的参数吗?
- 有关在文本文件中取指定行指定字符串的问题,请大家帮忙,谢谢。。。
- 急,跳楼救命!
- 一个关于子程序的问题
- 为什么listview没有选择时,listview就默认选了第一个item?
- ~~~~~~~~~555,救命啊,如何识别出Range对象里面具有不同样式信息的子元素
vb中,string相关的讨论在另一个贴子进行中。
http://expert.csdn.net/Expert/topic/1638/1638625.xml?temp=.2595484
Note = Trim(CStr(ResSet.Fields("Note")))没用啊
note在监视器中的值是:
板蓝根原购买3350.00元,退药款840.00元,实2510.00元。