Article View: comp.lang.pascal.delphi.misc
Article #86Stupid BUG in SQL LINKS ORACLE driver/Delphi
From: Deja User
Date: Wed, 18 Aug 1999 00:00
Date: Wed, 18 Aug 1999 00:00
30 lines
2692 bytes
2692 bytes
I am using Delphi 3.01 C/S so I am not sure if it has been fixed in future versions. I am not even sure if it's a bug or a feature but my trace into the behaviour have all the tell tale signs of a bug. Place a TQuery component on a form. The database property should point to an Oracle alias. I am not sure how it will react to other SQL servers (or more accurately, how other SQL servers will react to it). Set the SQL property to a simple statment and qualify the table name will the schema name as well. For example: select * from schema.table Turn the Request Live property to TRUE and now try to set the Active property of TQuery to True. You will get an error message from Oracle that Table or View does not exist. Your first reaction may be that Live Queries are not supported on remote SQL servers. Well, that may be true but that is not what causing the error. You are getting the error from Oracle and not Delphi....hmmm.... Time to dig in a little: Start SQL Monitor and then run the form containing your TQuery. You will see that after a bunch of (seemingly useless) conversation with Oracle, the Delphi sends (Select * from "schema"."table") to the Oracle server---notice double quotes around schema and table names. If you take the SQL statement as is, i.e. with double quotes around the schema and table names and run it any SQL tool (e.g. SQL WorkSheet from Oracle), you will get the same "Table or View does not exist" error message. So, it is the quotes which are causing this error. FOLKS AT INPRISE SHOULD HAVE KNOWN BETTER.....!!!! Regards, Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
Technical Details
Message-ID:
<7pehog$1ar$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff75c,dcaa479e61387f7d,start X-Google-Attributes: gidff75c,public X-Google-Thread: 10baee,dcaa479e61387f7d,start X-Google-Attributes: gid10baee,public X-Google-Thread: 10de66,dcaa479e61387f7d,start X-Google-Attributes: gid10de66,public X-Google-Thread: fd817,dcaa479e61387f7d,start X-Google-Attributes: gidfd817,public From: Deja User <dejacom@my-deja.com> Subject: Stupid BUG in SQL LINKS ORACLE driver/Delphi Date: 1999/08/18 Message-ID: <7pehog$1ar$1@nnrp1.deja.com> X-Deja-AN: 514215118 X-Http-Proxy: 1.1 x31.deja.com:80 (Squid/1.1.22) for client 198.163.69.6 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Wed Aug 18 14:59:36 1999 GMT X-MyDeja-Info: XMYDJUIDdejacom Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.database.sqlservers,borland.public.delphi.database.desktop,alt.comp.lang.borland-delphi X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)