freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] parsing T-SQL with flex & yacc (was: segfaultinPerl'sEmail::Store when using freetds)
- From: Зверев Виталий Борисович <VZverev AT genesis.spb.ru>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] parsing T-SQL with flex & yacc (was: segfaultinPerl'sEmail::Store when using freetds)
- Date: Fri, 24 Feb 2006 15:04:21 +0300
Thanks James,
alas it was not mine (and not handmade by anybody) statement.
"select cnt from #temp1 where 1=2" was captured by profiler as reply on odbc
call sequence:
SQLPrepare(hstmt, ( unsigned char * )"select count(1) as cnt ,type into
#temp1 from sysobjects group by type ; select cnt,type from #temp1 where cnt
> ? ", SQL_NTS); SQLDescribeParam(hstmt,1, &DataType, &ParamSize,
&DecimalDigits, &Nullable);
So, the primary question is: How to get placeholder's datatype if correlated
object has temporary nature and does not exist before now?
My guess - no how...(ok, It is modification of well-known "halting" paradox
about prediction of program's result)
Maybe community have another opinions?
Sincerely yours.
-------------------------------------------------------
Vitaly Zverev, OCP DBA 8&8i
Oracle E-Business Suite &
Infiniband Linux Cluster Administrator
Genesis Ltd., St.Petersburg, Russia
> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of James
> K. Lowden
> Sent: Thursday, February 23, 2006 4:54 AM
> To: FreeTDS Development Group
> Subject: Re: [freetds] parsing T-SQL with flex & yacc (was:
> segfaultinPerl'sEmail::Store when using freetds)
>
> Зверев Виталий БориÑович wrote:
> > I'm still digging of placeholder's parser and begin thinking about
> > correlations with Pandor's box.
>
> ;-)
>
> > select count(1) as cnt ,type into #temp1 from sysobjects
> group by type
> > ;
> >
> > select cnt,type from #temp1 where cnt > ?
> >
> > How to get datatype of placeholder (#temp1.cnt)?
> ...
> > The native MS odbc driver give me an answer ;) :
> > SET FMTONLY ON select cnt from sysobjects where 1=2 SET
> FMTONLY OFF
> > Error :[Microsoft][ODBC SQL Server Driver][SQL
> Server]Invalid column
> > name 'cnt'.
>
> 'cnt' is not a column in sysobjects. Perhaps you want:
>
> SET FMTONLY ON
> select cnt from #temp1 where 1=2
> SET FMTONLY OFF
>
> Is that any help?
>
> Regards,
>
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
-
Re: [freetds] parsing T-SQL with flex & yacc (was: segfaultinPerl'sEmail::Store when using freetds),
Зверев Виталий Борисович, 02/21/2006
- Re: [freetds] parsing T-SQL with flex & yacc (was: segfaultinPerl'sEmail::Store when using freetds), James K. Lowden, 02/22/2006
- <Possible follow-up(s)>
-
Re: [freetds] parsing T-SQL with flex & yacc (was: segfaultinPerl'sEmail::Store when using freetds),
Зверев Виталий Борисович, 02/24/2006
- Re: [freetds] parsing T-SQL with flex & yacc (was: segfaultinPerl'sEmail::Store when using freetds), James K. Lowden, 02/25/2006
- Re: [freetds] parsing T-SQL with flex & yacc (was: segfaultinPerl'sEmail::Store when using freetds), Зверев Виталий Борисович, 02/25/2006
Archive powered by MHonArc 2.6.24.