触发访问数据插入查询 [英] Commit The Access Data Insert Query as it fire

查看:67
本文介绍了触发访问数据插入查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我通过vb.net查询访问中保存数据时,直到完成完整功能后,数据才被保存.有什么方法可以将数据保存为执行的查询.
我使用此代码保存数据,请在执行查询时帮助我保存数据


when i save data in access through vb.net query the data is not save until the complete function is not done. Is there is any way to save the data as the query executed.
i use this code to save the data please help me in this to save the data as query excecuted


Dim cmdNonQuery As DbCommand = CreateCommand()
        cmdNonQuery.CommandText = tsql
        Try
            cmdNonQuery.ExecuteNonQuery()
        Catch ex As SqlClient.SqlException
            Throw New Exception(ex.Message)
        End Try

推荐答案

您可以清楚地提出问题吗?

您标记说访问"也有问题&您的代码显示为"Sql".哪个数据库?

对于您的问题,请使用代码或数据库中的事务".

在VB .NET中使用数据库事务 [ SQL Server事务和错误处理 [
can you make your question clearly?

You Tag says "Access" also question & your code says "Sql". which database?

For your issue use Transactions in Code or database.

Use database transactions in VB .NET[^]

SQL Server Transactions and Error Handling[^]


这篇关于触发访问数据插入查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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