自动产生客户编号 [英] Auto generate customer id

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

问题描述



我正在处理客户数据库项目.前端是vb.net,后端是ms访问.

我可以工作的产品ID可以自动生成.在此ID中,包含客户的第一个字母,产品类型的前两个字母继续为数字.

例如:客户名称-斯大林,产品类型-戴尔,在这种情况下,产品ID可以生成"sde001".我想要帮助如何检索这两个字符串吗?

Hi,

I''m working customer database project. Front end is vb.net and back end is ms access.

I could work product id can generate automatically. In this id contain first letter of customer and first two letter in product type continues numeric.

Example: customer name- stalin, product type- dell in this case product id can generate "sde001". I want help how to retrieve this two string?

推荐答案

您可以为此使用子字符串.例如:

you can use substring for this. example:

Dim x As String = "I am me"

'This is the Left : Result "I"
Debug.WriteLine(x.Substring(0, 1))

'This is the Mid : Result "am"
Debug.WriteLine(x.Substring(2, 2))

'This is the Right : Result "me"
Debug.WriteLine(x.Substring(x.Length - 2, 2))



http://forums.devx.com/showthread.php?threadid=175478 [ ^ ]



http://forums.devx.com/showthread.php?threadid=175478[^]


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

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