Solved

SQL's

Posted on 1997-05-06
2
173 Views
Last Modified: 2010-04-06
How can I give params to my SQL? How do I update SQL's?
Ex. I have a qeury like this:
Select c.naam,c.voornaam,cs.groep,cs.status,cs.count
from cursist7 c,cursus7 cs //Cursus7 And cursist7 must be 2 //variabeles.
where c.volgnr = cs.volgnr and c.naam = :=naam

How can I update a Qeury like this. Please help me, it's urgent.
0
Comment
Question by:DDTom23
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
javiertb earned 100 total points
ID: 1335941
To pass params to your Query :

Query1.Close;
Query1.Clear;  //Clear the Query text
Query1.Add('Select * from Table1 where Stringfield1 = :Param1');
Query1.ParamByName('Param1').AsString:='Name';
// You could also use Query1.Params[0].AsString:='Name');
Query1.Execute;

if now you want to add another clause just use Query1.Add(...)
or Query1[1] as it's a TString.


0
 
LVL 2

Expert Comment

by:javiertb
ID: 1335942
I'd really appreciate if you could evaluate my answer. It's a looong time since I last posted it.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month4 days, 4 hours left to enroll

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question