Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# C#4.0 Access
Hii,everybody i'm beginner
 
How to make button for search data in database access in windows form,i'm trying but faliure to do.
Posted 19-Sep-12 2:00am
Comments
Wes Aday at 19-Sep-12 7:05am
   
You drag a button from the toolbox and drop it on your form in the form designer.
Manfred R. Bihy at 19-Sep-12 7:06am
   
You'll have to explain more where exactly your difficulties are. We can't see your screen and neither do we have access to your disk.
Please add more details like some code snippets, error messages if applicable. "I'm trying, but failure to do" is not a helpful description of your woes.
CodeHawkz at 19-Sep-12 8:04am
   
@Professionals above this comment: Don't pick on the poor fellow :D Point him in the right direction would you? I bet any of you can write few steps for him to get the basic idea :)

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi there,
 
You cannot 'make' the button do anything Big Grin | :-D
 
Drag and drop a button on to your form. Double click on it. In the auto generated method, write code to open a connection to your database. Write a SELECT sql statement in which the WHERE clause will contain the criteria you want to search from. Execute that SQL and display it in a datagrid or something.
 
Sample SQL: SELECT * FROM [MyTable] MT WHERE MT.Name LIKE '%hawkz%'
This SQL will pull all rows of 'MyTable' where 'Name' column contains the string 'hawkz'
 
Try following these steps and implementing it. It won't be easy for you I guess. But try and post some code that gives an exception or does not work as you hope. Then we'd try and help you figure out where the problem is.
 
Hope this help you.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 475
1 Maciej Los 349
2 Richard MacCutchan 220
3 BillWoodruff 219
4 Mathew Soji 160
0 OriginalGriff 8,759
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,269
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411028.1 | Last Updated 19 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100