如何在其他字段中使用自动编号 [英] How to use autonumber in other field

查看:89
本文介绍了如何在其他字段中使用自动编号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MS Access 2007中有一个表,称为"Case".该数据库链接到我在VB2010中的项目.该表中的第一字段称为自动".我把这个作为自动编号.我现在要尝试的是创建案例ID" 并以自动"中的当前日期和当前自动编号之间的组合来表示.场地.例如:191010-12. tq.

解决方案

将行插入表时会生成Access Autonumber值. .见本节 在下面的文章中检索Microsoft Access自动编号值:

检索标识或自动编号值(ADO.NET)

更多信息:

如何:使用Visual Basic .NET将记录插入Access数据库中时检索标识值

 


I have one table in MS Access 2007 called "Case" and this database is link to my project in VB2010. The first field in the table is called "Auto" i made this one as autonumber. What i'm trying to do now is to create the "Case ID" with the combination between current date and current autonumber in "Auto" field. eg: 191010-12. Is there anyone who can help me out with this problem?tq.

解决方案

The Access Autonumber value is generated at the time the row is inserted into the table. See the section Retrieving Microsoft Access Autonumber Values in the below article:

Retrieving Identity or Autonumber Values (ADO.NET)

More info:

HOW TO: Retrieve the Identity Value While Inserting Records into Access Database By Using Visual Basic .NET

 


这篇关于如何在其他字段中使用自动编号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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