将行插入表时会生成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
更多推荐
如何在其他字段中使用自动编号
发布评论