473,378 Members | 1,417 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,378 software developers and data experts.

Find button coding

hi
i need coding for find button using adodc control.the search should be by name.if we enter the name of employee then search button should search name from data base either it exists in batabase as first name,middle name, or as last name.the list should display.then if we click particular name from the list then data of that particular employee should display.
Jul 30 '07 #1
4 2560
hariharanmca
1,977 1GB
hi
i need coding for find button using adodc control.the search should be by name.if we enter the name of employee then search button should search name from data base either it exists in batabase as first name,middle name, or as last name.the list should display.then if we click particular name from the list then data of that particular employee should display.
You can do it in single line of Query.

Expand|Select|Wrap|Line Numbers
  1. Dim strSql As String
  2.  
  3. strSql = " Select * from tblTableName where strSearchField like '" & trim(txtSearchText) & "' or intSearchField = " & val(txtSearchValue) & ""
  4.  
  5. Dim rstAdodc As New ADODC.Recordset
  6.  
  7. rstADODC.Open strsql, Dbonnection, Cursor type, Lock type
  8.  
  9.  
then
FillControlsWithRecordSet()
Jul 30 '07 #2
hi
thanks for doing help me.
but this code is generating errors on lines 5 and 7.please tell me about how to fill controls with recordset.
i wll be gratefull to you.
regards



You can do it in single line of Query.

Expand|Select|Wrap|Line Numbers
  1. Dim strSql As String
  2.  
  3. strSql = " Select * from tblTableName where strSearchField like '" & trim(txtSearchText) & "' or intSearchField = " & val(txtSearchValue) & ""
  4.  
  5. Dim rstAdodc As New ADODC.Recordset
  6.  
  7. rstADODC.Open strsql, Dbonnection, Cursor type, Lock type
  8.  
  9.  
then
FillControlsWithRecordSet()
Jul 31 '07 #3
Killer42
8,435 Expert 8TB
thanks for doing help me.
but this code is generating errors on lines 5 and 7.please tell me about how to fill controls with recordset.
Could you be more specific? What errors?
Jul 31 '07 #4
hariharanmca
1,977 1GB
hi
thanks for doing help me.
but this code is generating errors on lines 5 and 7.please tell me about how to fill controls with recordset.
i wll be gratefull to you.
regards
You have to Import ADODC OCX refferenct to your project. if it is there, Then post the code you had tryed with error descreption.
Jul 31 '07 #5

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

Similar topics

0
by: bala murugan via .NET 247 | last post by:
(Type your message here) -------------------------------- From: bala murugan hi, i am using DataGrid in my project , so, i would like to change the DataGrid Edit Button Properities to Push...
14
by: clintonG | last post by:
This is an appeal for peer support sent to Microsoft as will be noted in closing. The Login control does not include a Cancel button. The only option is to convert the Login control to a...
2
by: moondaddy | last post by:
I had to repost this because I had to update and change my msdn alias. I will re-ask the question and clarify a few things that were not clear before. This code is all executed on my dev...
2
by: PerumalSamy | last post by:
Hi, Thanks in advance. I need to know the coding for disabling the back button of internet explorer after getting signout of my application and where the coding to be written. i mean inside...
9
by: poml | last post by:
Hello, first time posting on thescripts.com, and I'm in dire need of some help. All I want to do is disable the submit button (not the entire form) onClick, and am wondering if this is possible. ...
0
by: sweatha | last post by:
Hello Friends I have created the project with 2 forms. In the first form, I have 2 buttons. The first button has the backcolor as "fusia" by default. If I click the button means then backcolor of...
5
by: Greg (codepug | last post by:
I have a table that contains a field called RDATE (reminder date). Dates are optionally entered to remind a user of an upcoming event. I have a reminder button that launches a popup form, and a...
0
by: matthewaveryusa | last post by:
Okay so I have a whole bunch of begininvokes to update my gui. I enable/disable, change the text, and all that beautiful stuff. This is, unfortunately, how my code looks right now: public...
16
by: Steve | last post by:
I am working on a database that has a main menu, many sub-menus and some sub-sub-menus. They are all forms that have numerous command buttons on them to open forms and reports in the database. The...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.