semicolon 0 Light Poster

C#, SQL SERVER 2005

first. Sorry for the bad english :>
can anyone give me ideas, techniques, theories, or any posible solution.
Here is a scenario
i have a form called SearchItem and a database table doc_Item
doc_Item has a 1 million. . . data.
when i click a button getITem the form SearchItem shows up
and get all the items in doc_Item table. when my data is 100000 the my program is running correctly but not that fast it took some 3 seconds to retrieve,
but when i make it 1 million it becomes slower and cannot continue

The problem is the way i retrive data i think, i get all the doc_Item and store it in a temptable using the command

Select ROW_NUMBER() OVER(ORDER BY Id DESC) AS Row,*
                             INTO Temptable
                             From (doc_Item)a";

I create a temptable with RowNumber so that i can apply paging in my application. 100,000 is fine but 1 million cannot proceed. my error returns an invalid object temptable. i think the sql server cannot proceed in creating a temptable with 1 million data.

i used this technique to speed up my application performance. please help me. any recommendation, techniques or ideas are much appreciated.
How can i retrieve 1 million data.
Like how do the google return million or billions of data in just a millisecond or the speed of insert like SQLBULKCOPY.

semicolon 0 Light Poster

Thanks for the reply. is there some code sample to extract?

semicolon 0 Light Poster

Please help me to unrar a file in C# or any free 3rd party dll

semicolon 0 Light Poster

Hello, is there any good tutorials,library for downloading a file?
I have an application that has a check for update button. please help me with my project

semicolon 0 Light Poster

thanks for the help man.

semicolon 0 Light Poster

i don't want to use loop. its so heavy for the computer to work for large amount of data
I have a datagrid view that when you change the first column data like for example

|col1 |col2 |col3 |col4|
|  1  |  5  |  9  | 13 |
|  2  |  610 | 14 |
|  3  |  7  |  11 | 15 |
|  4  |  8  |  12 | 16 |

// when i edit col1 row 3 other columns will adjust
// like it will increment by 1


|col1 |col2 |col3 |col4|
|  1  |  6  |  10 | 14 |
|  2  |  7  |  11 | 15 |
|  4  |  8  |  12 | 16 |
|  5  |  9  |  13 | 17 |

so every data is being updated.
col1,col2,col3,col4 are save in one column in my database table column Qnty
if i use loop it is to slow.

semicolon 0 Light Poster

Hello i have a datatable

|row|col2|col3|col4|col5|
| 1 | val| val| val| val|
| 2 | val| val| val| val|
| 3 | val| val| val| val|
| 4 | val| val| val| val|
| 5 | val| val| val| val|
| 6 | val| val| val| val|
| 7 | val| val| val| val|
| 8 | val| val| val| val|
| 9 | val| val| val| val|
| 10| val| val| val| val|
| 11| val| val| val| val|
| 12| val| val| val| val|
| 13| val| val| val| val|

how can i select the data in datatable
when user click nextpagebutton : gridview.Datasource = datatable where row between 1 and 5
when user click nextpagebutton again : gridview.Datasource = datatable where row between 6 and 10
and . . . so that i can apply paging

semicolon 0 Light Poster

You can't disable or hide tabpage in a tabcontrol only tabcontrol can be disabled. this is my problem also. my solution was remove the tabpages and add it again when i need them.

here what i did hope this may help you

private void button2_Click(object sender, EventArgs e)
        {
            if (tabControl1.TabPages.Contains(Secondtabpage))
            {
                return;
            }
            else
            {
                tabControl1.TabPages.Add(Secondtabpage);
            }
        }

when the form loads just remove the other tabs like
tabControl1.TabPages.Remove(Secondtabpage);
tabControl1.TabPages.Remove(Thirdtabpage);

so that the firsttab will be shown. use the above code to show your tabpages again.:

semicolon 0 Light Poster

Hello i have a database table

| col1 | col2 | col3 | col4 | col5 |
|  val |  val |  val |  val |  val |
|  val |  val |  val |  val |  val |
|  val |  val |  val |  val |  val |
|  val |  val |  val |  val |  val |
|  val |  val |  val |  val |  val |
|  val |  val |  val |  val |  val |
|  val |  val |  val |  val |  val |

and a datatable

| col1 | col2 | col3 | 
|  val |  val |  val |  
|  val |  val |  val | 
|  val |  val |  val | 
|  val |  val |  val | 
|  val |  val |  val |

I want to update just the col1 col2 and col3 in database table via datatable
how can i do this? thank you

semicolon 0 Light Poster
import java.util.Scanner; // Needed for the scanner class
/**
    Chapter 2
    Programming Challenge
*/
    public class Wordgame
    {
        public static void main(String[] args)
         {

        //Initialize variables 
            String name = "";        //The user's name
            String age = "";         //The user's age
            String city = "";        //The name of a city
            String College = "";     //The name of a college
            String Profession = "";  //A profession
            String animal = "";      //A type of animal
            String petName = "";     //A pet's name
        // Create a Scanner object for keyboard input.
            Scanner keyboard = new Scanner (System.in);
        // Get the user's name. 
            System.out.print ("Enter your name: ");
            name = keyboard.nextLine();
        // Get the user's age
            System.out.print ("Enter your age: ");
            age = keyboard.nextLine();
        // Get the name of a city.
            System.out.println ("Enter the name of a city: ");
            city = keyboard.nextLine();
        // Get the name of a College.
            System.out.println ("Enter the name of a college: ");
            College = keyboard.nextLine();
        // Get a Profession
            System.out.println ("Enter profession: ");
            Profession = keyboard.nextLine();
        // Get a type of animal.
            System.out.println ("Enter name of an animal: ");
            animal = keyboard.nextLine();
        // Get a pet name.
            System.out.println ("Enter a pet name: ");
            petName = keyboard.nextLine();
        // Display the "Story."
            System.out.println("There once was a person named " + name +
                                " who lived in " + city + ". At the age of ");
            System.out.println( age + ", " + name + " went to college at " + College + " , " + name.toUpperCase() + " graduated …
semicolon 0 Light Poster
semicolon 0 Light Poster

Hello I have a table

item1

|   Item    |   Qnty    |   ProdSched   |
|    a      |    1      |       1       |
|    b      |    2      |       1       |
|    c      |    3      |       1       |
|    a      |    4      |       2       |
|    b      |    5      |       2       |
|    c      |    6      |       2       |

is There a way i can output it like this using sql SELECT?

    |   Item    |   ProdSched(1)(Qnty)  |   ProdSched(2)(Qnty)  |
    |    a      |           1           |       4               |
    |    b      |           2           |       5               |
    |    c      |           3           |       6               |

Thank you

semicolon 0 Light Poster

Aside from that, is there any concepts can you suggest?

sorry for the wrong grammer and spelling :)

semicolon 0 Light Poster

Hello. Is there any book that is all about programming or sql compilation of concepts, theory or algorithms? like
Sorting Algorithm, no programming language to learn just pseudocodes or flow chart. thank you

semicolon 0 Light Poster

Is ther a fastest way to retrieve data from sql server like the sqlbulkcopy the fastest way to insert large data.?

semicolon 0 Light Poster

Please Help.

DataTable dtSelectedColumns = dtOriginal.DefaultView.ToTable(false, "Column1", "Column2");

this code retrieve data from a datatable but i want to retrieve like in sql command

 "Select Column1, Column2 From Table where Column1 = "data";

Thank you

semicolon 0 Light Poster

Hello i need help for my project

I have a data grid view

    | column 1 | column 2 | column 3 | column 4 |
    _____________________________________________
    |          |  Forcast |user input|user input|
    |   item 1 |__________|__________|__________|
    |          |  stocks  |user input|user input|
    |__________|__________|__________|__________|
    |          |  Forcast |user input|user input|
    |   item 2 |__________|__________|__________|
    |          |  stocks  |user input|user input|
    |__________|__________|__________|__________|
    |          |  Forcast |user input|user input|
    |   item 3 |__________|__________|__________|
    |          |  stocks  |user input|user input|
    |__________|__________|__________|__________|

in column 2 user can iput data and save it in the database and also the user can view the data. how can i determine the current cell that the data won't mix up.
the purpose of the cell to be idenfified is because of calculation like

((item 1, stocks, column 3) X (item 1, forcast, column 4))

any help. thank you.

sorry for the bad english

`

semicolon 0 Light Poster

Hi can i apply this in a windows form C#? BubbleImage

this is an html5 is there any in C# windows form

semicolon 0 Light Poster

thank you for the respounce. solve my problem

semicolon 0 Light Poster

Hi i have a datagrid in my c# windows form and i want to merge the row
he can input data in w1, w2, w3 and .., and save.

                            weeks
Item 1 | Forecast        | w1 | w2 | w3
Item 1 | Stock on Hand   | w1 | w2 | w3
Item 1 | Orders          | w1 | w2 | w3

       | Forecast        | w1 | w2 | w3
Item 1 | Stock on Hand   | w1 | w2 | w3
       | Orders          | w1 | w2 | w3

any code or solution for this
thank you

semicolon 0 Light Poster

Hello I have an application that connects to sql database
my application is multithread.
When I run the application it loads top 500k data and stores it in #temp1(connection1), i can browse, search and select data, while my thread is running and storing the other 501 to 1m data in #temp2(connection2).
My problem is temporary table can be seen in there own session. what is the other way to this? so that i can get the 501k to 1m data.

semicolon 0 Light Poster

Thank you for the reply..The issue is when the sql query still not finish and i want to abort the thread that running the sql query. The sql query still run i cannot close the sql connection.

here is the scenario. i have a datagrid view when i click the add item buttom it loads a form. the form retrieves 2000 data first and store it in a temporary table with a different connection and the last data are retrieve by a differnt connection and stores and a different temp table then i drop the first temp table.
i design my form like this because its to slow to retrieve all data, I want the user not to wait for a long time but can select and view from the first 2000 while the program is still retriving the other data

semicolon 0 Light Poster

I have a Thread running sql query
how can do i force stop the thread when i dont want to use it anymore.

I have a form that loads 100k from sql server
i retrieve first the 2k then the thread runs to retrieve the other data
i want to kill the thread before it finish when i close the form.
Thread.Abort() is useless.. any help?

semicolon 0 Light Poster

hello,, i have a multithread application.. my application connects to the database
can i open 2 connection at the same time? or can i thread the connection also. thanks in advance.

semicolon 0 Light Poster

Hello,
I have a Form A, Form B, Form C. . . and FormSearch. FormSearch can be use by A,B,C...
The purpose of FormSearch is to display data in search for the data you want depending on the query that have been pass on it example

FormSearch has a method pagingData(string sql, int paging limit) and showSimpleData(string sql)
pagingData() method process the query and show FormSearch with paging design
showSimpleData() show only simple FormSearch

Now from Form A it has a button btnA
when i press btnA i use pagingData() because the sql table has a 100k data inside so
if i use the showSimpleData() it will make my program slow.

the problem is when i pass a query in pagingData() method with many joints the FormSearch becomes slow because of the sql query being pass but if i pass a query for example Select * From Table even if the Table has 100k data it is still faster. what can i do with joint table in order to make it faster?

I am thingking about processing top 500 data and output it and then process 99500 for later use.
The way i process data is Table to Temptable. i think this is the problem. please help me make it faster.