I.T. Discussion Community!
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

April Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyPascal and Delphi Coding BoardDelphi Single User Apps Topic   Print This     

SQL won't work with combobox as param!

SQL won't work with combobox as param! in Delphi Single User Apps topic (part of our Pascal and Delphi Coding group).

Quick Search: won't   combobox   SQL won't   SQL won't work   combobox param  
PANTLORD
 (Inactive)
-- USA
Hi there,

I am trying to pass the text from a combo box I have to an SQL statement but it doesn't seem to like it. It keeps taking the combobox text as a field which it is not i.e. it is a value in the field.

OpDetailsSQL.SQL.Add('SELECT OPERATOR_LEVEL FROM OPERATOR_DETAILS WHERE OPERATOR_NAME =' + OpNameCombo.Text);

Any ideas ? Ideally i would like to have two where parameters in the statement one from a combobox the other a text box.

Thanks
PL I
 Posted 19 years ago (Thread Starter)
Comment Quote
About PANTLORD -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #5262, 1 replies
Thread Started 2/12/2002 8:48:00 AM
View Counter=2260
Last Reply Posted 2/15/2002 6:06:00 AM)
Location=-- USA 
Joined=19 years ago   MB Posts=5  
Most Recent Post
PANTLORD
 (Inactive)
-- USA
Hi again,

Found a solution to this outlined below.

SQL.Add('WHERE OPERATOR_NAME = "'+OpNameCombo.Text+'"');

Thanks
Niall :)
 Posted 19 years ago (Thread Starter)
Comment Quote
About PANTLORD -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #5303 (Level 1.1)  Reply to 5262
Thread Started 2/15/2002 6:06:00 AM
View Counter=2
Location=-- USA 
Joined=19 years ago   MB Posts=5  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1192A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #5262 Counter
2260
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2021 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech