Ya, finally it seem to be the only solution...

thx for all comments

-----Message d'origine-----
De : Thomas CORNET [mailto:[EMAIL PROTECTED]]
Envoyé : 10 février, 2003 14:33
À : Struts Users Mailing List
Objet : RE: [OT] aliases [SQL SELECT column aliases]




    Well, if this can not be detectable, you should make a test at the 
start of your application. Try to make a test statment with some 'AS' 
inside, and catch the SQLException. If it is catched, make a flag to true, 
otherwise make the flag to false. Thus, inside your application, accessing 
this flag, you'll be able to know how to build your queries. I know it may 
not be 'good' programming, but if it is a solution which works...

                 Thomas

At 20:15 10/02/2003, you wrote:
>well some bd must have the "AS" to work properly...
>
>I would like to dynamicly detect it..
>
>Event with DatabaseMetadata its not possible ?
>
>-----Message d'origine-----
>De : atta ur rehman [mailto:[EMAIL PROTECTED]]
>Envoyé : 10 février, 2003 14:18
>À : Struts Users Mailing List
>Objet : Re: [OT] aliases [SQL SELECT column aliases]
>
>
>A safer bet tough, IMHO, would be not to use 'AS' at all. As most of
>database servers would support space delimited column aliases.
>
>ATTA
>
>----- Original Message -----
>From: "Durham David Cntr 805CSS/SCBE" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, February 10, 2003 11:09 AM
>Subject: RE: [OT] aliases [SQL SELECT column aliases]
>
>
> > It seems strange that a database server would not support AS.  Be sure
>that you are not trying to use any reserved words.  The documentation for
>your database server should tell you what words are reserved.
> >
> > -Dave
> >
> > > -----Original Message-----
> > > From: atta ur rehman [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, February 10, 2003 1:12 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: [OT] aliases [SQL SELECT column aliases]
> > >
> > >
> > > The only way to know wehter or not you could use AS for
> > > column aliases would
> > > be to refer to the SELECT statement documentation of your underlying
> > > database server. The JDBC driver has got nothing to do with it.
> > >
> > > ATTA
> > >
> > >
> > > ----- Original Message -----
> > > From: "Gilbert, Antoine" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Monday, February 10, 2003 11:02 AM
> > > Subject: RE: [OT] aliases [SQL SELECT column aliases]
> > >
> > >
> > > > I wanna detect if i must use the "AS" or not to define my alias
> > > >
> > > > for example, using "AS" with jdbc-idb crash..
> > > > for example, not using "AS" with jdbc-odbc crash
> > > >
> > > > so sometime i have to use "AS" keyword in SQL and sometime not..
> > > >
> > > > -----Message d'origine-----
> > > > De : atta ur rehman [mailto:[EMAIL PROTECTED]]
> > > > Envoyé : 10 février, 2003 14:05
> > > > À : Struts Users Mailing List
> > > > Objet : Re: [OT] aliases [SQL SELECT column aliases]
> > > >
> > > >
> > > > hello Antoine,
> > > >
> > > > what it is that you want to 'detect'?
> > > >
> > > > Regards,
> > > >
> > > > ATTA
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Gilbert, Antoine" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > > Sent: Monday, February 10, 2003 10:39 AM
> > > > Subject: aliases
> > > >
> > > >
> > > > Hiya
> > > >
> > > > I have a little database question about alias...
> > > >
> > > > Most of bd(drivers) support the use of "AS", but generally
> > > you can ommit
> > > it
> > > > and it work. But some bd must have the "AS" specified and
> > > some dont accept
> > > > the "AS" (only space).
> > > >
> > > > How i can detect that, using java.sql.*
> > > >
> > > > p.s.: sorry for my bad english
> > > >
> > > > regards
> > > >
> > > > Antoine
> > > >
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to