I would try to avoid single letter table aliases as back in the day when there 
were only 10 workareas, you could refer to them as a, b, c, etc. 

rk


-----Original Message-----
From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On 
Behalf Of Tracy Pearson
Sent: Tuesday, March 16, 2010 10:26 PM
To: profoxt...@leafe.com
Subject: Re: How could this error happen? (VFP9SP1 free tables on LAN)

Shouldn't the union's sessions table have a different alias than B?
Not sure if this relates, but access to open cursors with a single 
letter still work in VFP 9.

MB Software Solutions, LLC wrote:
> Here's the code:
>
> nID = erl_sub.idnum
> sele a.pmf, a.mu_date, b.date, b.time,;
>       b.sesid, .F. as SesXRec, a.attmark;
>       from seats a, sessions b;
>       where a.sesid = b.sesid;
>               and a.erlsubid = nID;
>               and b.date > dNewStop;
> union select c.pmf, c.mu_date, b.date, b.time,;
>       b.sesid, .T. as SesXRec, 0 as attmark;
>       from sessionx c, sessions b;
>       where c.sesid = b.sesid;
>               and c.erlsubid = nID;
>               and b.date > dNewStop;
>       into cursor TempSes
>
>
> Often users are getting "Error 24 - Alias name is already in use."  How 
> can that be?  If cursor TempSes existed already, wouldn't it just be 
> overwritten?  If this perhaps due to some other area of code having a 
> temporary DBF open called TempSes?
>
> My fix will be to just put a USE IN (SELE("TempSes")) ahead of it, but I 
> was curious as to why this sql would fail with this error.  (It's legacy 
> code from many moons ago, and the error doesn't always happen.)
>
> tia,
> --Mike
>
>
>   

[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/df1eef11e586a64fb54a97f22a8bd0440678504...@ackbwddqh1.artfact.local
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to