473,479 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Search Box Combining two columns (Search Page) ASP.NET

3 New Member
I am having some trouble in my search.aspx page (Search Page)

This is my code:
Expand|Select|Wrap|Line Numbers
  1. <asp:AccessDataSource runat="server" ID="AccessDataSource1" DataFile="_private/records.mdb" SelectCommand="SELECT * FROM [DriversRecords] WHERE ([LastName] LIKE '%' + ? + '%') OR ([FirstName] LIKE '%' + ? + '%')">
  2.    <SelectParameters>
  3.    <asp:formparameter FormField="LastName1" Name="FirstName" Type="String" />
  4.    <asp:formparameter FormField="LastName1" Name="LastName" Type="String" />
  5.    </SelectParameters>
  6. </asp:AccessDataSource>
When I type the first name in text box...It's Working the same when i type the last name.

But when i'm trying to combine them such us I'm going to type in textbox : "George Santos" the result is "No data found"??

Combing two columns returns to null?? How to do it?
Jan 6 '13 #1
2 1846
Nemphyst
3 New Member
PROBLEM SOLVED! don't need to answer.
Jan 6 '13 #2
Anas Mosaad
185 New Member
I'm glad that your problem was solved. Please share the solution to help someone that might have the same issue in the future.
Jan 6 '13 #3

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

Similar topics

10
39321
by: Anand Pillai | last post by:
To search a word in a group of words, say a paragraph or a web page, would a string search or a regexp search be faster? The string search would of course be, if str.find(substr) != -1:...
1
1454
by: Matt | last post by:
If I want to include google search in my asp page, i.e. with a text box and a submit button but it will link to google. How to do that? please help.
5
6038
by: JackT | last post by:
Hi, I have the following SQL SELECT Table1.Col1, Table3.Col1 AS Expr1, COUNT(Table1.Col2) AS Col2_No, COUNT(Table1.Col3) AS Col3_No etc, FROM Table3 INNER JOIN Table2 ON...
6
7185
by: Rizyak | last post by:
******************** alt.php.sql,comp databases.ms-sqlserver microsoft.public.sqlserver.programming *********************************** Why doesn't this work: SELECT * FROM 'Events'
6
5386
by: Don | last post by:
I'm thinking this is simple and I'm just not understanding how to do it but I have to ask because I'm stumped. I have a query (which is used to create a report) and three of the columns in this...
1
1517
by: Rachelle | last post by:
I'm having some trouble with the search field that i am setting up using PHP and HTML, I am connecting to a database to return proper information pertaining to something being searched. I...
2
5632
by: ZEROFIVE | last post by:
Just wanted to know how would i go about making a Search field and search results page if someone wanted to search on my site? Thanks alot, Jimmy
2
1589
by: kevin24 | last post by:
i need help regarding this concept of searching a user input text in a webpage. the user type in the sentence the search the over all page(note:google search work out but don' t use in database)in...
4
1189
by: rashmi1369 | last post by:
Hi all I am new to this forums.I am modifying a page that is developed in ajax,html,php,and mysql.My problem is I have insert a search box that search the item in the database .when we input a item...
4
15750
by: abdulgani | last post by:
Dear Team, i have an requirement that : i want to search all the columns of all the tables in the particular database based on the specific key word or an free text. example : table 1:...
0
7033
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6903
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...
1
6726
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5318
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4763
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4468
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2974
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1291
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
557
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.