ADO - Accessing FoxPro - Different Field Names... ??

I have a Delphi application that is using ADO (dbGo) to access a set
of FoxPRo Tables.  They are DBFs with CDX indexes.  

It is fairly simple - I downloaded and installed the Database drivers
from M$ - and it allows me to connect.

The Issue I have run into is very strange - and there must be a reason
for it.  
Basically - I open the table up in DBFViewer2000 - and I see a field
called ADDRESSLIN and another called ADDRESSLI2...   
I also see these field names when I open them using a Text file
editor.  They are the 10 Character names...


However, when I open a Table or a Query using ADO - those fields are
showing as AddressLine1 and AddressLine2 

So - the DBF file shows fields called ADDRESSLIN - and the ADO access
in Delphi shows AddressLine1

Any thoughts as to why this might be happening??


G. Bradley MacDonald
0
Bradley
10/14/2011 8:45:59 AM
embarcadero.delphi.database 1294 articles. 0 followers. Follow

9 Replies
923 Views

Similar Articles

[PageSpeed] 53

On 2011-10-14 10:45, Bradley MacDonald wrote:
> So - the DBF file shows fields called ADDRESSLIN - and the ADO access
> in Delphi shows AddressLine1

There is a difference in length for field names in foxpro between free 
tables and tables used in a database container. Max length for free 
tables is 10 characters and max length for a DBC table is 27 characters.

I guess that your ADO connection uses the DBC to read the table and that 
DBFViewer2000 does not.
0
Mikael
10/14/2011 9:39:09 AM
On Fri, 14 Oct 2011 02:39:09 -0700, Mikael Eriksson
<micke314@gmail.com> wrote:

>On 2011-10-14 10:45, Bradley MacDonald wrote:
>> So - the DBF file shows fields called ADDRESSLIN - and the ADO access
>> in Delphi shows AddressLine1
>
>There is a difference in length for field names in foxpro between free 
>tables and tables used in a database container. Max length for free 
>tables is 10 characters and max length for a DBC table is 27 characters.
>
>I guess that your ADO connection uses the DBC to read the table and that 
>DBFViewer2000 does not.
Hi Mikael,

Thanks - that would explain it!!

Do you know of a tool that would allow me to connect to a Fox Pro
Database and view the database, field descriptions and data???


Bradley
0
Bradley
10/14/2011 4:54:54 PM
> 
> Do you know of a tool that would allow me to connect to a Fox Pro
> Database and view the database, field descriptions and data???
> 

Nope sorry. Haven't used FoxPro in the last decade or so. Moved over from FoxPro 2.6 to Delphi instead of following MS to Visual FoxPro.
0
Mikael
10/14/2011 9:37:59 PM
> {quote:title=Bradley MacDonald wrote:}{quote}
> On Fri, 14 Oct 2011 02:39:09 -0700, Mikael Eriksson
> <micke314@gmail.com> wrote:
> 
> >On 2011-10-14 10:45, Bradley MacDonald wrote:
> >> So - the DBF file shows fields called ADDRESSLIN - and the ADO access
> >> in Delphi shows AddressLine1
> >
> >There is a difference in length for field names in foxpro between free 
> >tables and tables used in a database container. Max length for free 
> >tables is 10 characters and max length for a DBC table is 27 characters.
> >
> >I guess that your ADO connection uses the DBC to read the table and that 
> >DBFViewer2000 does not.
> Hi Mikael,
> 
> Thanks - that would explain it!!
> 
> Do you know of a tool that would allow me to connect to a Fox Pro
> Database and view the database, field descriptions and data???
> 
> 
> Bradley

OpenOffice.org Calc opens dbf. Excel don't open it. But OpenOffice their Calc program opens up. It's only for inspection.

Bjarne
0
Bjarne
10/15/2011 1:44:54 PM
go get yourself a copy of TDBF which is free with source 
and it works great

http://tdbf.sourceforge.net/
0
Dennis
10/15/2011 5:06:28 PM
On Sat, 15 Oct 2011 10:06:28 -0700, Dennis Passmore
<DennisP@nospam.dpassmore.com> wrote:

>go get yourself a copy of TDBF which is free with source 
>and it works great
>
>http://tdbf.sourceforge.net/
Hi Dennis,

Thanks for pointing this one out!   But I was thinking about a program
that would allow me to view and edit the data.  I realize I could
write my own - but I have some time constraints.

Bradley
0
Bradley
10/16/2011 3:56:15 PM
If you install this along with your application then you good just
use a shell open command to view them. Just google for this file as
it is free.  FLVPlayerSetup.exe

There is another one that I have that will let you edit them but
I will have to look for a while to find and it is free also.
0
Dennis
10/16/2011 5:44:45 PM
On Sun, 16 Oct 2011 10:44:45 -0700, Dennis Passmore
<DennisP@nospam.dpassmore.com> wrote:

>If you install this along with your application then you good just
>use a shell open command to view them. Just google for this file as
>it is free.  FLVPlayerSetup.exe
>
>There is another one that I have that will let you edit them but
>I will have to look for a while to find and it is free also.
Dennis,

I am not worried about it being free - if it is good and worth the
price.

Thanks for the information!

Bradley
0
Bradley
10/16/2011 10:39:59 PM
I almost forgot to answer your question.
Go get DBFNavigator.exe from http://www.alxsoft.narod.ru/
it works fine as is free also.
0
Dennis
10/18/2011 1:41:18 PM
Reply:

Similar Artilces:

An attempt to attach an auto-named database for file .../App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I am trying to display data on an asp page from a sql express database that is in the app_data folder however when trying to run the application I get the above error. I also get the error when I right click on the asp page from within the IIS website. But when when I right click the asp page from with VS and select 'view in browser' it displays fine!I have tried setting the ACL for the App_Data folder for mymachine\ASPNET  to R/W as well as for the *.mdf and *.ldf file  to no avail.What am I missing here?...

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

An attempt to attach an auto-named database for file (file location).../Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Greetings, I have just arrived back into the country (NZ) and back into ASP.NET.  I am having trouble with the following:An attempt to attach an auto-named database for file (file location).../Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. It has only begun since i decided i wanted to use IIS, I realise VWD comes with its own localhost, but since it is only temporary, i wanted a permanent shortcut on my desktop to link to my intranet page.  Anyone have any ideas why i am getting the above error? have...

populating a ddl with field names from a database
Hi all,I like to be able to populate a drop down list with field names from a database table. I can get the values in the fields no problem, but am unable to get the actual field names. To get the values I use a simple SQL line 'Select * from tbTest1', but does anyone know how to the get the names of each of each of the fields??Thanks in advance. SELECT * will return all the fields in the table. IF you only need some fields you need to list out the columns you want in the SELECT statement. sample:SELECT   column1,   column2FROM   table**********...

Delphi error with WSDL field names
Hi; I have an ugly situation where my client is constructing the message to post to the service poorly. when I intercept the message prior to posting the tage is cased incorrectly. I have created the following work around, but this seems to be a very heavy handed and brittle solution. In the WSDL all instances of the definition of the input tag are all lowercase, however when delphi generates the submission the I is capitalized. I presume I have missed something very elementary but cant for the life of me figure it out. Thanks in advance for any assistance. -Allen {code...

MySQL Timestamp fields via Delphi ADO?
What are my options to use timestamps via parameterized inserts and selects from Delphi's ADO components (all Delphi versions)? ...

Determine the database field names populating a dropdownlist
Hello all!I'd like to know if it's possible to determine the field names that are involved with the data that is presented in a dropdownlist. I have the following snippet of code: DropDownList ddl = (DropDownList)row.FindControl("DDL_ContactMethod");string selectedContactMethod = ddl.SelectedValue; I can see the values that are selected, but I can't determine how to get the field names.  I'm guessing I'll have to access the datasource in some manner? Thanks all! ddl.SelectedItem.Text  There are no stupid questions, only easy answers. Howe...

Connection String for ADO Database in delphi prism
Hi, I want to connect to a database with ADO and aspx. from VB code what is the equivalent in delphi prism ? .... Dim MyReader as sqldatareader Dim MyConnection as sqlconnection = new sqlconnection() myConnection.connectionstring = configurationmanager.connectionstrings("DSN_MYDB").connectionstring Dim mycommand as sqlcommand = new sqlcommand() mycommand.commandtext="select * from mytable" mycommand.commandtype = commandtype.text mycommand.connection = myconnection mycommand.connection.open() Myreader=mycommand.executereader(commandbehavior.closeconnec...

Several Delphi ADO Database help questions
Okay, I have an Access database connected to an ADO dbgrid in delphi through ADO connections. there are a few problems I'm having with it. Firstly, I have a lookup table for one of my columns set up in access, it's for a supplierID column, it gets the supplier ID number and the supplier name from a suppliers table for you to select from. This doesn't work in the delphi DBGrid, I have looked for ways to allow it to display but all I've found are complex blocks of code that don't work for me and that I don't have the skill to adapt. Secondly, I have several buttons ...

Displaying related fields with an SQL database and ADO.NET
Okay, so I know how to display a singular table from an SQL databse into a datagrid, but I was never shown how to display related fields into one table. Here is the problem: I need to display student information for an online college solution. The information I need to display is First Name, Last Name, and some information from the course they are currently taking. Now - the student information is in a Student table and the course information is in (you guessed it) the Course table. The student table contains a foreign key, the courseID, which is obviously the key in the course table....

how to get a control ID from a bind field name / bound field (column) name from a formview's control
I have a form view which is bound to a table, now from codebehind file I need to apply some formatting based on some of the field's bound control. For example, if Formview1 is bound to Employee table, and it's item template has a control with ID "Label1" which is bound to "EmployeeJoinDate" . Now, I have a different table which has a list of field name(EmployeeJoinDate is one of them), all of which should be applied some formatting based on some condition. Now I can take two approach for that, but I am stuck at both:  1. If I can somehow get the contro...

How to find database table and their field name run time.
 I am using sql server as back end. Through connection string I am getting database name. But in A dropdown I want to show list of table in that database. And in another B drop down I want to show fields of table selected in A dropdown. can any one help in getting the field .    The sp_Tables query will return the tables in a database and sp_Columns returns the column nameshttp://www.vb-tips.com/dbpages.aspx?ID=9e2d9af4-3909-421d-b422-87c1d376674d  Silverlight-helpVb TipsSpace Coast .Net User Group And if you want to dig deeper into the structure of the da...

Compatability problem Windows7 and ADO database acces from Delphi XE
All, I don't know where i need to post this, so i thought i'd try here, if someone can tell me where i need to put this posting. I have an application written in Delphi XE which uses ADO database connectivity. It retrieves data from an IBM i (AS400) using SQL either directly or via user defined table functions on the server side. (Queries are run via TADOConnection, TADODataset and TADOQuery) The application runs 100% perfectly on Windows XP, but when i try to run the program on Windows7 i have the following issues: 32 Bit. All the UDTFs work correctly except one. This is not...

Am I able to rename the table or field's name from database
Hi I have a problem when i connect to the Remedy Database. The actual name's table came up like weird name. The table's name is like H12, T 30 then the fields in each tables like c1, c2 , c3..... Do you think i could be able to rename those tables and fields names to whatever i create, so the users can look at easily to create the reports?? Thanks again pete Sounds like you have a strange ODBC driver. It doesn't recognize the table structure, so it considers all the columns to be computed fields. (I remember that we used to have that problem with a certain Btr...

How to get Field Values and Names from a database using ASP.NET
I know that with ASP I can loop through a Recordset object to get the NAME of the fields and the values of those fields: For Each objField in objRecordset.Fields Response.Write objField.Name Response.Write objField.Value Next Is this possible in ASP.NET?------------------------------------------ Ariston Collander "No one person's opinions could be said to be 'truer' than another's. For each is the sole judge of his or her own experiences." - Protagoras ofcourse..read the MSDN articles about Dataset and Datareader objects. they will walk you through i...

Web resources about - ADO - Accessing FoxPro - Different Field Names... ?? - embarcadero.delphi.database

Highest Percentage Of Opera Mini Users Accessing Facebook? Macau
If you were asked to guess which country had the highest percentage of users of Opera mobile Web browser Opera Mini users accessing Facebook ...

International Users Accessing Facebook Places Through US VPN Accounts
By using a virtual private network (VPN) hosted in the United States, Facebook users from around the world are accessing Facebook Places. The ...

What are some alternatives to Yodlee for accessing bank information?
Clay Loveless , Founder, Jexy. Co-founder, Mashery. Founder, Jexy. Co-founder, Mashery.

Cloud Console - Accessing files in cloud storage for iPad on the iTunes App Store
Get Cloud Console - Accessing files in cloud storage on the App Store. See screenshots and ratings, and read customer reviews.

Meryl Streep On Accessing The Characters Within - YouTube
Meryl Streep talks about the importance of an actors work representing their ability. CONNECT WITH AFI: http://facebook.com/AmericanFilmInstitute ...

Accessing the Future Fund a sensible proposal, says super expert Daryl Dixon
As portfolios go, the Future Fund's asset allocation is concentrated in higher-risk investment, including equities and alternative assets.

Accessing my Super
I'm 57 - can I access my super?

Australia, US accessing Indonesian telephone data, leaked documents show
Newly disclosed documents from former US intelligence contractor Edward Snowden have revealed that Australian intelligence efforts against Indonesia ...

Euthanasia advocate Philip Nitschke detained at Melbourne Airport, accuses Customs officials of accessing ...
Euthanasia advocate Philip Nitschke has accused Customs officials of accessing hundreds of patients' sensitive records on his laptop after detaining ...

Frances Abbott scholarship: Sydney woman pleads guilty to accessing Whitehouse Institute records on PM's ...
A Sydney woman who leaked the student records of Tony Abbott's daughter pleads guilty. A Sydney woman who leaked the student records of Prime ...

Resources last updated: 12/1/2015 2:06:14 PM