Solved

READING  UNCOMMITTED SAVE TO DATATABLE

Posted on 2011-02-12
6
391 Views
Last Modified: 2012-05-11
Hi All,

In the middle of inserting data, I want to read that uncommitted table to get another data and store it to datatable.

Private functio Read_Uncommitted_Table(TrsId as string, _
                                                          cmdSQLCommand as sqlcommand) as datatable
   
    dim dtTable as datatable

    return dtTable
End Sub

How could I do it ?

Thank you.

0
Comment
Question by:emi_sastra
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:s_chilkury
ID: 34881143
This has nothing to do with VB.Net. You sql query which fetches the records from the table has to be written such that it will bring uncommitted data from the DB.

The SP which fetches the records should have the following statement at the start of the batch statements:

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 34881148
Hi s_chilkury,

Could set it using vb code at the Read_Uncommitted_Table function ?

Thankyou.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34883908
Are you using stored procedure or text command? If text command, then try this

sqlcmd.CommandText = "SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ; Select ..."
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:emi_sastra
ID: 34885034
Hi CodeCruiser,

I use text command.

Which one is better, Isolation Level or Read With (NoLock) ?
And Why ?

Thank you.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 34887115
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 34887314
Ok.

Thank you very much for your help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can one ComboBox's items be determined by another? 9 26
Javascript Refresh Parent Page from Popup 3 48
Spacing between controls 4 30
DataGridView Events ? 3 37
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now