Re: basic SQL query




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

.



Relevant Pages

  • OfficeJet 7410 communication problems
    ... Printer is connected by Ethernet cable to a Wireless-G Linksys router. ... The Tobisha laptop is connected to the router and DSL internet via ... When trying to access the scan feature from HP Director I would receive ... would connecting it through a USB cable solve these issues? ...
    (comp.sys.hp.hardware)
  • Re: OT:Router with dialup
    ... > Does anyone know of a good way to stop each pc connecting to ... Probably want a dialup modem/gateway/router/type thing (basically a modem, ... network hub/switch all in one) and use a schedule feature to lock out one or ... gateway, timer, IP blocker/timer feature) So you can block each IP and only ...
    (uk.media.dvd)
  • Re: Axim X5, WM2003 - cannot connect to shares on my PC
    ... > How are you connecting, ... The share feature will only work over ... > file explorers in a much friendlier way than with the built in FE. ... though I don't know much about their network support. ...
    (microsoft.public.pocketpc)
  • Re: Axim X5, WM2003 - cannot connect to shares on my PC
    ... How are you connecting, first off. ... The share feature will only work over ... network support is built in to some third party ... file explorers in a much friendlier way than with the built in FE. ...
    (microsoft.public.pocketpc)