Click here to Skip to main content
15,908,776 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hey, i want to view/browse my datas form MYSQL using this buttons begin(>>), previous(<), next(>), last(>>) whenever i clicked the last button it will goes to the end of the Data in MYSQL for example. and when the next button is clicked then it will browse the next data.. thanks for answering. GODBLESS!! :))

my form

My Google+ forum[^]
Posted
Updated 25-Sep-13 1:58am
v5

Here is an example. Next time try to use google before asking questions, which have a lot of answers in the internet.
 
Share this answer
 
Comments
Rick van Woudenberg 25-Sep-13 4:45am    
I complete agree.
Hey Black Diamond,

This is actually pretty straight forward SQL programming. There are several ways to go about it and I think the reason why you don't have much anwsers yet, is because yoú don't have a specific question about one topic or control, but rather you ask people to write the entire program for you. I'd suggest you read this article first :

Connect C# to MySQL[^]

It will explain the basics of MySQL database querying and also has a few great methods for you to use which will come in very handy. In a nutshell :

* If the amount of data that you'd like to search is not a whole lot, just select everything from the database an chuck it into a datatable. That way you spare valuable socket time from your resources.
* assign an event to each button and set the action accordingly. For example, if you press the forward button then an integer value will be increased by one, which is use in de datatable.Select method or looping through the datatable rows, using the foreach iteration. The double forward button could have a selection statement attached to it, such as
DataRow row = datatable.Rows[datatable.Rows.Count - 1];
This will return the last row in the table and can be used to fill in the form.

If keeping connections open is not a problem, you could of course query directly to the database. Again, you'd need a reference point to construct your SQL queries to ensure a proper result back.

I hope this short anwser to an extensive question will get you going. Cheers !
 
Share this answer
 

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