Sujit,
Thanx again for the response,
Now, I have two .sql files :
1. Pdox.sql :
'Select ContractorId, (Title||' '||LastName||' '||Initials) as
ContName from Contractor'
2. Npad.sql :
'Select ContractorId, LastName from Contractor'
I noticed something here, when I manually typed in the contents of Pdox.sql
exactly into Npad.sql thru notepad,
Voila! It worked thru Delphi Tquery component, hence Notepad makes no
difference and my thoughts about Text Encoding is out.
I also noted something in addition, if an 'AS' doesnot appear in the SQL
statements of .sql file, Delphi throws the error 'Operation not applicable'.
It throws the above exception for the following, nomatter where they are
created (Paradox or notepad)
'Select * from Contractor'
'Select ContractorId, LastName from Contractor'
My question now is ,
Is there a way to solve this issue?
Is using .sql in Delphi really reliable?
Thanks,
Shafeeq.
"Sujit Singhania" <
XXXX@XXXXX.COM >wrote in message
Quote
Shafeeq,
Can you show us whats in your SQL file?
I just wanted to compare the two SQL files, one created with Paradox (and
working fine in Delphi) and the other created thru Notepad (not working in
Delphi).
Sujit
"Shafeeq JB" < XXXX@XXXXX.COM >wrote in message
news:3f055aac$ XXXX@XXXXX.COM ...
>Hi all,
>
>I am aiming at creating a Paradox Script file (.sql) programatically so
that
>I can reuse that single file for all my querying needs.
>
>I opened up an existing .sql file (created by Paradox) with Notepad and
>found that it contained SQL Text in plain English with some comments.
>
>I noticed that, when I created a script file manually with Notepad (with
>some sql text in it), and saved it with a .sql extension, it works just
fine
>with in Paradox. But when I try to load it from Delphi (i.e. Select *
from
>mytest.sql ) it gives an error : Operator not applicable. However Delphi
>successfully loads any sql scripts created by Paradox. BTW I use Delphi
5
as
>my development tool.
>
>Am I missing something? Is any encoding applied on text? Does any one
know
>how this could be done? I would appreciate some help.
>
>Thnx in Advance,
>Shafeeq.
>
>
>
>