Solved

SQL's

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 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