Solved

SQL's

Posted on 1997-05-06
2
169 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
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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