Solved

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

Posted on 1998-09-09
5
242 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
5 Comments
 
LVL 10

Expert Comment

by:Lischke
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now