473,405 Members | 2,349 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,405 software developers and data experts.

syntax on algorithm

102 100+
pls help on this.. imagine i have i have 2 ways of searching data... 1 is by dropdown search and another is textbox search in page A ..either one can perform the search...

pageB

a="select from table
where partnumber= '"&textboxSearch&"' || partnumber ='"&dropDownSearch&"' "
set b = conn.execute(a)

if not b.eof
call main()

else
response.redirect("confirm.asp?res=cannotFind")
end if

can that be done?? but i cant get my main()
-------------------------------------------------------------------------------------

i have also tried

a="select from table
where partnumber= '"&textboxSearch&"' || partnumber ='"&dropDownSearch&"' "
set b = conn.execute(a)

if textboxSearch ="" then
response.write(" confirm.asp?res=blank ")

call main()

** this res=blank can work for the textbox search... but when i click on the dropdown.. it always link me to the "res=blank "
Jun 19 '07 #1
3 1215
jhardman
3,406 Expert 2GB
what is "||" supposed to mean?

Jared
Jun 20 '07 #2
lyealain
102 100+
what is "||" supposed to mean?

Jared

that is or statement
Jun 21 '07 #3
jhardman
3,406 Expert 2GB
that is or statement
when connecting to a db you have to write in SQL (structured query language. I'm not really an expert here either, but I can get around). You should use "OR" not "||"

try
Expand|Select|Wrap|Line Numbers
  1. a="SELECT * FROM table WHERE partnumber= '"&textboxSearch&"' OR partnumber ='"&dropDownSearch&"'"
I tried to emphasize sql keywords by capitalizing them, but sql is not case-sensitive.
Jun 21 '07 #4

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

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
22
by: Tuang | last post by:
I'm checking out Python as a candidate for replacing Perl as my "Swiss Army knife" tool. The longer I can remember the syntax for performing a task, the more likely I am to use it on the spot if...
23
by: Carter Smith | last post by:
http://www.icarusindie.com/Literature/ebooks/ Rather than advocating wasting money on expensive books for beginners, here's my collection of ebooks that have been made freely available on-line...
2
by: Johnny | last post by:
Sorry I posted this post earlier but got the name and subject the wrong way round (new to this!) so it perhaps didn't look right Sorry for that. But please please answer if you know anything about...
6
by: Bonj | last post by:
does anybody know if there is a good SQL syntax highlighting control? Must be freeware. If not can anybody think of a good way of writing one in C# or C++ that doesn't flicker? Thanks
2
by: bor_kev | last post by:
Hi, First of all, i want to use the new managed class syntax and STL.NET under Microsoft Visual (C++) Studio 2005 Beta. I read in a Microsoft...
8
by: Paul Roberts | last post by:
Hi, I'm hoping somebody here can help me with a simple problem of template syntax. Here's an example: template<typename T, int iclass A { static int a;
1
by: tkpmep | last post by:
I'm trying to optimize a function using SciPy's optimize.fmin, but am clearly getting the syntax wrong, and would be grateful for some guiidance. First, here's the function def func(Y,x): """Y...
2
by: JJA | last post by:
I'm looking at some code I do not understand: var icons = new Array(); icons = new GIcon(); icons.image = "somefilename.png"; I read this as an array of icons is being built. An element of...
20
by: W Karas | last post by:
Would the fear factor for concepts be slightly reduced if, instead of: concept C<typename T> { typename T::S; int T::mem(); int nonmem(); };
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...
0
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...

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.