访问Foxpro数据库 [英] Accessing Foxpro Database

查看:84
本文介绍了访问Foxpro数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在访问一个现有的Foxpro数据库,其中我无法控制

结束。我已成功访问除

之外的所有表格。这一个表我可以访问表中的前9个字段,但是

VB.NET将不会看到前九个字段之后的任何字段。我发现

问题是第10个字段名称以1开头。我能够

创建此表的副本,重命名该字段并且可以成功

访问它。问题是我需要能够以当前形式访问此表




我使用Provider = VFPOLEDB.1使用OleDBConnection。


非常感谢任何帮助。


谢谢,

I am accessing an existing Foxpro database, of which I have no control
over. I have been successful in accessing all the tables except for
one. This one table I can access the first 9 fields in the table, but
VB.NET will not see any fields past the first nine. I have discovered
that the problem is the 10th field name begins with a 1. I was able to
create a copy of this table, rename the field and can successfully
access it. The problem is that I need to be able to access this table
in its current form.

I am using the OleDBConnection using Provider=VFPOLEDB.1.

Any help would be very much appreciated.

Thanks,

推荐答案

在不知道任何进一步的细节的情况下......你是否在

中尝试了AS子句的SELECT语句?例如:


SELECT *,1ThisColumnBlowsUp AS ThisNowWorks FROM Foo


不确定这是否会缓解您的情况,但可能值得

尝试。

Without knowing any further details.... have you tried the AS clause in
your SELECT statement? For example:

SELECT *, 1ThisColumnBlowsUp AS ThisNowWorks FROM Foo

Not sure if this will relieve your situation, but it may be worth
trying.


嗨约翰,


我觉得很奇怪" FoxPro的" table有一个以

开头的列,而不是允许的下划线或字母字符。关于这是怎么发生的,我可以认为这有三种可能性 - 它是由FoxPro创建的DBF创建的
,或者它是作为Excel电子表格创建的

并保存为DBF,或者在创建之后,有人使用记事本或Hex编辑器更改了列名

。我尝试使用

记事本进行此类更改,当我打开结果表时,我只看到第一列; a / b
情况类似于你所看到的情况。


我会联系拥有的人。表格并提出一些问题。


-

Cindy Winegarden MCSD,Microsoft Visual FoxPro MVP
ci ************** @ msn.com www.cindywinegarden.com

< jo ****** @ gmail.com>在消息中写道

news:11 ********************** @ y43g2000cwc.googlegr oups.com ...
Hi John,

I find it very curious that a "FoxPro" table has a column that begins with
something other than the allowed underscore or alpha characters. I can think
of three possibilities as to how this happened - it''s either a DBF created
by something other than FoxPro, or it was created as an Excel spreadsheet
and saved as a DBF, or, after it was created someone changed a column name
using notepad or a Hex editor. I tried making this type of change using
Notepad and when I opened the resulting table I saw only the first column; a
situation similar to what you''re seeing.

I''d contact the person who "owns" the table and ask some questions.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
ci**************@msn.com www.cindywinegarden.com
<jo******@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.com...
我正在访问一个现有的Foxpro数据库,我无法控制它。我已成功访问除
之外的所有表格。这一个表我可以访问表中的前9个字段,但是VB.NET将不会看到前九个字段之后的任何字段。我发现问题是第10个字段名称以1开头。我能够创建此表的副本,重命名该字段并可以成功访问它。问题是我需要能够以当前形式访问此表

我使用Provider = VFPOLEDB.1使用OleDBConnection。

非常感谢任何帮助。

谢谢,
I am accessing an existing Foxpro database, of which I have no control
over. I have been successful in accessing all the tables except for
one. This one table I can access the first 9 fields in the table, but
VB.NET will not see any fields past the first nine. I have discovered
that the problem is the 10th field name begins with a 1. I was able to
create a copy of this table, rename the field and can successfully
access it. The problem is that I need to be able to access this table
in its current form.

I am using the OleDBConnection using Provider=VFPOLEDB.1.

Any help would be very much appreciated.

Thanks,



括号表示法有帮助吗?选择[field1],[1.field2]等


Jeff

< jo ****** @ gmail.com>在消息中写道

news:11 ********************** @ y43g2000cwc.googlegr oups.com ...
Might the bracket notation help? Select [field1], [1.field2] etc

Jeff
<jo******@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.com...
我正在访问一个现有的Foxpro数据库,我无法控制它。我已成功访问除
之外的所有表格。这一个表我可以访问表中的前9个字段,但是VB.NET将不会看到前九个字段之后的任何字段。我发现问题是第10个字段名称以1开头。我能够创建此表的副本,重命名该字段并可以成功访问它。问题是我需要能够以当前形式访问此表

我使用Provider = VFPOLEDB.1使用OleDBConnection。

非常感谢任何帮助。

谢谢,
I am accessing an existing Foxpro database, of which I have no control
over. I have been successful in accessing all the tables except for
one. This one table I can access the first 9 fields in the table, but
VB.NET will not see any fields past the first nine. I have discovered
that the problem is the 10th field name begins with a 1. I was able to
create a copy of this table, rename the field and can successfully
access it. The problem is that I need to be able to access this table
in its current form.

I am using the OleDBConnection using Provider=VFPOLEDB.1.

Any help would be very much appreciated.

Thanks,



这篇关于访问Foxpro数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆