使用VB.NET编码自动生成客户ID [英] CUSTOMER ID AUTO GENERATION USING VB.NET CODING

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

问题描述

尊敬的先生/女士,

我创建了一个客户数据库,其中包含客户名称,产品类型,客户ID和其他一些字段.

我需要使用vb.net编码将客户ID自动生成为客户名称的前四个字母+产品类型的前四个字母



所以请引导我............


谢谢你

谨记

ANANTH.P

Dear Sir/Madam,

I had a created a customer database, in that customer name , product type, customer id and some more fields are there.

I need the customer id to be auto-generated as first four letters of customer name + first four letters of product type using vb.net coding



So kindly guide me............


THANKING YOU

WITH REGARDS

ANANTH.P

推荐答案

基本上,您必须进行简单的字符串连接并在添加客户时生成ID.没有具体的方法可以实现.

但是,在大多数操作中,客户ID应该是唯一的.您是否在数据库中记录客户详细信息?如果是这样,为什么不使用客户ID作为数据库记录索引ID?检索客户详细信息时,您可以根据需要生成其他ID以显示.
Basically you have to a simple string concatenation and generate the ID when you are adding a customer. There is no specific way to do that.

However, the Customer ID should be a unique one in most of the operations. Are you recording customer details in a database? If so why don''t you use the customer ID as the database record index id? When retrieve the customer details you can generate a different ID to display, as you want.


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

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