如何用1增加字符串和数字值 [英] How to Increment String and Numeric Value with 1

查看:74
本文介绍了如何用1增加字符串和数字值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在一个Windows应用程序里面工作,我有一个购买表格,在购买形式我有自动增量的账单号。



例如..



我的账单如SBN001,SBN002,SBN003,SBN004



现在,如果我删除SBN003 billno我得到SBN005并且它工作正常..但我手动编辑没有SBN003。那意味着在我的数据库账单中没有存储像。



SBN001,SBN002,SBN004,SBN003现在我想检查这4账单中的最大值是否意味着SBN004为最大值我想要加上SBN004 1 ..



我怎么能这样做请帮助我..





感谢问候

Hello To All,

I am Working in one windows Application inside that i have one purchase form, In purchase form i have bill no with auto increment.

For Example..

I have bill like SBN001 , SBN002 , SBN003 , SBN004

Now if i delete SBN003 billno i get SBN005 and it's work fine .. But i manually edit that no with SBN003. That Means in my database bill no stored like .

SBN001 , SBN002 , SBN004 , SBN003 now i want to check max no in this 4 bill means get SBN004 as max no and i want to Plus SBN004 with 1 ..

How i can do this please help me..


Thanks Regards

推荐答案

设计问题。不要将账单号用作数据库中的标识符和主键。在那里使用自动生成的ID。然后,您可以根据需要更改帐单编号列的内容。
Design problem. Do not use your "bill number" as the identifier and primary key in the database. Use an automatically generated id there. Then you can change the content of the "bill number" column as you like it.


这篇关于如何用1增加字符串和数字值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆