473,387 Members | 1,561 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how Getting data from threads??

hi every one
i want to give data from database and bound to a grid from a thread i write this sample code:
**************************************
private void thr()
{
dataGridView1.DataSource = null;
linq1DataContext da = new linq1DataContext();
var p = from cust in da.Customers select cust;
dataGridView1.DataSource = p;
dataGridView1.Refresh();
}

private void sbButton1_Click(object sender, EventArgs e)
{

th = new Thread(new ThreadStart(thr));
th.IsBackground = true;
th.Start();
}
************************************************** **
and i use sqlserver2000 and northwide database
when i click the button and run thread the grid fills with data but after this the form don't respond
and the grides scrolls dont work.
everyone know how can i fix this problem.
thanks.
Aug 17 '10 #1
0 937

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: FaXiA | last post by:
Hi all, I'm working on a program that reads a structure from a file (1000 records). The file read part works great, but I'm hitting a roadblock on howto read the data from the pointer. I'm...
2
by: Sam | last post by:
When I am debugging my asp.net application with breakpoints I notice I have two concurrent threads running at once. Why is that? It is causing havoc with my response.redirects. Note, I am not...
1
by: Nathan Sokalski | last post by:
I have retrieved data from a database using a SELECT statement that includes an INNER JOIN. The data seems to be retrieved to the DataSet OK, but I am having trouble getting the data from the...
0
by: Antal Rutz | last post by:
Hi all, I'd like to collect snmp data from varoius network devices parallel. First I tried with my own threadpool class then I gave a try to Christopher Arndt's threadpool.py...
0
by: sags | last post by:
Hi , Iam a new uesr of this group. I have a small doubt . Iam using the code mentioned below to retrive the data from tab delimited text file ., but Iam getting all the columns of the text file...
25
by: altemurbugra | last post by:
Hi is it possible to make search on for example on google without api with a list of words 1- there is word list 2- the script will take the words from the list by turn 3-it iwll make the search...
9
by: nickyeng | last post by:
Hi My case is i get the error on runtime while getting data from a file. i get this error: Record of 12344 is found! 5 testing 4272 _cygtls::handle_exceptions: Error while dumping...
4
by: dfent | last post by:
I'm using MS Access 2003 1 form with 7 sub forms, updating 7 tables. I've split my database but still getting data changes error messages when multiple people are in the database. Any help would be...
6
by: bushwacker | last post by:
Hello all, I'm a chemical engineering student. our teacher has given us a project to do some calculations based on some equations. those equations include constants, which are to be read from a...
5
by: abhi3211 | last post by:
i am using java inside java script page. in that page i want to use two dropdown list. in first dropdown list i am getting data from ms-access database. in second dropdown list i want to get data...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.