如何在其他字段中使用自动编号

编程入门 行业动态 更新时间:2024-10-27 23:32:29
本文介绍了如何在其他字段中使用自动编号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我在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

更多推荐

如何在其他字段中使用自动编号

本文发布于:2023-07-16 16:06:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1123400.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字段   编号   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!