Re: variable vs column name
Mike Aubury <[email protected]>
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <CAGAq4WEA71PT+u5qOLdvBE2ceh3oNHxqQYaCwoDHSYfR6Hw4KA@mail.gmail.com> |
Yes - this is the correct behaviour - at compile time - it doesn't even
check if the table you are deleting from exists - so can't know if there is
a column with a particular name in it...
I find looking at the generated code helpful for tracking these sorts of
things down :
ibind[0].ptr=&b;
A4GL_execute_implicit_sql(A4GL_prepare_select(ibind,1,0,0,"DELETE FROM a
WHERE ?=\"X\" ",_module_name,5,0,0),1,0,0);
This is also the reason most people use the variable name prefixes (things
like m_, mv_ etc ) - as this reduces the chances of such things..
If you are unsure - you can also prefix the 'name' with a "@" -
delete from A where @b="X"
and that should force it to assume 'b' is a column name - not a variable
name..
On 21 February 2012 09:45, Michal Hajek <[email protected]> wrote:
> Sorry for double post, still not familiar with the list :-(
>
> Michal
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss