Re: basic SQL query
- From: "Ed Prochak" <edprochak@xxxxxxxxx>
- Date: 7 Sep 2006 12:42:45 -0700
Hugo wrote:
Ed Prochak wrote :
Actually it is not surprising. AFAICT, they assumed you know which DBMS
product you are connecting to, so once connected, you do not need a WHO
AM I feature.
I'm not asking for a "who am i" feature, but just a simple SQL query
that allow me to check that I'm actually connecting to something real.
The reason I suggested a WHO AM I feature was that it allows you to
figure yout which table you can feel safe trying to query.
Good luck. Keep us posted on you progress.
Actually I'm using Hibernate to connect on several different DBMS. So I
did post a similar question on hibernate forums, but still waiting for
an answer.
--
Hugo
Well presumably (I never used Hibernate), you have a connect
command/function. It retrurns either success or failure. So what more
assurance do you need? The only uniform sequence for any SQL DBMS that
I can think of is along the lines of this:
CONNECT(someDBMS)
xyz=SQLPREPARE("COMMIT WORK;")
SQLEXECUTE(xyz)
DISCONNECT
I still wonder why you would be connecting to a DB without knowing what
tables you are going to use. A simple communications check isn't going
to prove anything beyond the fact that you could connect and query at
that point in time. There's no guarantee after that moment is gone that
the DBMS doesn't go down or that the network doesn't fail. So I cannot
see the business purpose.
Some interesting solutions proposed so far. I think if you do carry on
with this you'll end up trying multiple queries, sort of like probing
the hardware in the boot up process.
HTH,
ed
.
- Follow-Ups:
- Re: basic SQL query
- From: HansF
- Re: basic SQL query
- References:
- basic SQL query
- From: Hugo
- Re: basic SQL query
- From: Ed Prochak
- Re: basic SQL query
- From: hugo . lafayette
- Re: basic SQL query
- From: Ed Prochak
- Re: basic SQL query
- From: Hugo
- basic SQL query
- Prev by Date: Re: Communicating to a database server while in VPN
- Next by Date: Re: Communicating to a database server while in VPN
- Previous by thread: Re: basic SQL query
- Next by thread: Re: basic SQL query
- Index(es):
Relevant Pages
|