Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

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[^]
 
Share this answer
 
Comments
Hiren solanki 24-Dec-10 7:38am    
Good answer raja!!
rohit_189 29-Dec-10 23:41pm    
thanks raja.
thatraja 30-Dec-10 0:05am    
You welcome Rohit. But please make your clearly here after. Actually I gave this answer by my guess & related things. cheers.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900