Solved

How to process SQL statement by Database Server not by BDE or Delphi?

Posted on 1998-09-09
5
247 Views
Last Modified: 2013-11-23
I'd like to code SQL statement and process it by Database Server but now I must code it in Delphi SQL statement or SQL-92. Am I right?    
0
Comment
Question by:ceds98
[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
5 Comments
 
LVL 10

Expert Comment

by:Lischke
ID: 1339206
I don't get your question currently. If I understand you right you want to know whether and how you have to use SQL statements in Delphi. Is this correct? if not, please clarify your question a bit.

Ciao, Mike
0
 
LVL 10

Accepted Solution

by:
Jacco earned 50 total points
ID: 1339207
You can set the properties of an alias to SHARED AUTOCOMMIT (which I believe is the default). Then you can code any SQL statement your DB understands. (The passthrough SQL will be automatically commited).

You can setup your Database component so that the BDE doesn't parse your SQL statements.

Delphi SQL is very useful very say Paradox databases which don't support SQL. You can use the SQL of your server (which could be SQL-92).

Be careful though. The BDE decides wether a statement is passthrough or not, and sometimes a complex SQL statement get interpreted wrong by the BDE. What you can do is setup a special DataBase component for passthrough and one for normal SQL.

(Do you use IntrBase? I have a lot of examples for that one!)

Regards Jacco.
0
 

Author Comment

by:ceds98
ID: 1339208
I do not understand how to set that Jacco told me. And I set like this  pls tell me what's wrong.

I set 2 BDE aliases to the same instance(database) of ORACLE  
    Properties of 2 BDE
aliasname               PIS                    THRUPIS  
SQL passthroughmode     Shared autocommit      Not Shared

and I have 2 database components
    Properties of 2 database components
databasename            dbPIS                  dbTHRUPIS
alias                   PIS                    THRUPIS

and I have 2 TQuery
    Properties of 2 Tquery components
database                dbPIS                  dbTHRUPIS
SQL             SQL statement in SQL-92 format
                                   SQL statement in ORACLE format

But the second query failed. How to write the SQL statement in ORACLE format and process it by ORACLE not by BDE?  
0
 
LVL 1

Expert Comment

by:EmmDieh
ID: 1339209
How does the second query fail ?
I suppose that you have to use explicit transaction control
with DataBase.StartTransAction and DataBase.Commit.

0
 

Author Comment

by:ceds98
ID: 1339210
Forget my above comment. My sql statement failed because its complex so I applied some tricks with it and it work fine.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month7 days, 17 hours left to enroll

617 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