I may have mis-spoke about this being a SQL Spec, but I found this document 
from Microsoft that states:

"Column names can contain any valid characters (for example, spaces). If column 
names contain any characters except letters, numbers, and underscores, the name 
must be delimited by enclosing it in back quotes (`). When the Microsoft Access 
or Microsoft Excel driver is used, column names are limited to 64 characters, 
and longer names generate an error. When the Paradox driver is used, the 
maximum column name is 25 characters. When the Text driver is used, the maximum 
column name is 64 characters, and longer names are truncated. When the dBASE 
driver is used, characters with an ASCII value greater than 127 are converted 
to underscores. When the dBASE driver is used, characters with an ASCII value 
greater than 127 are converted to underscores. "

So maybe this is an Excel ODBC Driver specification that is conflicting. Either 
way, the last sentence seems to mean that the conversion to an underscore only 
takes place within the ODBC driver for dBASE and not the Excel ODBC Driver. I 
take that as confirmation that the conversion to an underscore I'm seeing is 
driven by Foxpro not by the ODBC driver because if it was the ODBC driver doing 
the substitution, it wouldn't even know if I were calling it from a development 
platform or a compiled runtime since it is by definition: remote. 

My understanding of the why is growing clearer, but my working around is still 
elusive at this point. 

Paul 

-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Paul H. 
Tarver
Sent: Thursday, April 19, 2018 1:17 PM
To: [email protected]
Subject: RE: INSERT INTO...SELECT Issue

Yes, I understand. But the "bug" comes in to play because apparently Foxpro 
allows you to recreate cursors of REMOTE DATA that include fields that start 
with numbers. I'm guessing that is to remain compatible with SQL. However, the 
conflict or bug occurs if you try to then use that remote data cursor to create 
a new cursor that complies with Foxpro's rule to not support fieldnames that 
start with a number. 

If there is any bug here, I think it is that Foxpro handles this situation 
perfectly in the development environment, but fails to adjust for this in the 
runtime. 

Otherwise, I think it is more of a specification conflict between SQL and 
Foxpro.

Paul 

-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Fernando D. 
Bozzo
Sent: Thursday, April 19, 2018 11:54 AM
To: [email protected]
Subject: Re: INSERT INTO...SELECT Issue

Hi Paul:

The problem is that Visual FoxPro explicitly says in documentation that
field names must start with a letter or underscore, so if in some rare
situation VFP respects a field name starting with a number it's really a
bug, and that's why this do not work allways.

Here is the spec on VFP name creation:
https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/d7aa568a(v%3dvs.71)



El jue., 19 abr. 2018 17:45, Paul H. Tarver <[email protected]> escribió:

> I posted a full detailed description of the process and all the testing
> I've done so far in this thread:
>
> https://leafe.com/archives/msg/510840
>
> Paul
>
>
> -----Original Message-----
> From: ProfoxTech [mailto:[email protected]] On Behalf Of Peter
> Cushing
> Sent: Thursday, April 19, 2018 8:53 AM
> To: [email protected]
> Subject: Re: INSERT INTO...SELECT Issue
>
> On 19/04/2018 14:38, Paul H. Tarver wrote:
> > <snip>
> >
> >
> > My question is this: Has anyone here run into this issue and if so, Is
> there
> > any another way or procedure around this situation that would allow me to
> > manually fix the fieldnames which start with a number assuming I have no
> way
> > to change the source data.
> >
> Not run into that issue but just want to check what actually happens, as
> not quite sure from your description.
> The client gives you a spreadsheet file.  Are you then appending that
> into a cursor and trying to select from the cursor into some other table?
>
> Peter
>
> ,"This communication is intended for the person or organisation to whom it
> is addressed. The contents are confidential and may be protected in law.
> Unauthorised use, copying or disclosure of any of it may be unlawful. If
> you have received this message in error, please notify us immediately by
> telephone or email.
>
> www.whisperingsmith.com
>
> Whispering Smith Ltd Head Office:61 Great Ducie Street, Manchester M3 1RR.
> Tel:0161 831 3700
> Fax:0161 831 3715
>
> London Office: 101 St. Martin's Lane,London, WC2N 4AZ  Tel:0207 299 7960
>
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** 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