sl的自动递增 [英] incrementation of sl no automaticaly

查看:102
本文介绍了sl的自动递增的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在.net 3.5中开发Windows应用程序.现在我对帐单格式存有疑问.在我的应用程序中,我通过设置属性"identity specification"将sl no设置为自动递增.从1开始直到我第一次调试应用程序时继续,下一次它会像明智地显示Max(slno + 1).但是在每种计费方式下,我都不需要从1开始.

我正在等待重播
谢谢我Advance

I am developing my windows application in .net 3.5 .now i have a small doubt in my billing form .in my application i set sl no as auto increment by seting the property "identity specification".its working and shows the result starting from 1 to continues when i debug the application at first ,next time it shows Max(slno+1) like wise .but i need sl no starting from 1 in each case of billing.

i am waiting to favorable replay
thanks i advance

推荐答案

不.它不是那样的.
当您指定一个Identity时,它将成为一个由数据库系统控制的字段,并且对于整个表都是唯一的..

您不能有两个相同的Identity值;就像在钞票上有两个相同的序列号一样:当人们注意到时,事情很快就会变得非常错误!

如果您需要帐单中的序列号,则必须自己为每一行创建它们.
Nope. It don''t work like that.
When you specify an Identity is becomes a field which is controlled by the database system and is unique for the whole of that table.

You cannot have two identical Identity values; It would be like having two identical serial numbers on banknotes: Things start to go very wrong very quickly when people notice!

If you need sequential numbers in your billing form, you will have to create them yourself for each row.


这篇关于sl的自动递增的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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