473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How do you determine what indexes exist on VFP DBF in VB.Net

Hi, I have a VB.Net application with Visual Foxpro DBF free tables. So
each table has a DBF and CDX file. I am using the vfpoledb.1 provider in an
Oledb environment to access the tables. I have a need to programmatically
determine what DBF fields are associated with the index in the table. I am
using the stmt:
Dim dtSchema As DataTable = MyDataReader.GetSchemaTable

to retrieve attributes of the DBF file such as fieldname, fieldtype, and
fieldsize. However, I can't find any reference to the indexes that are
associated with it.

Can anybody explain how I might query the CDX file to find out what indexes
are defined for the DBF file at runtime?

Thanks, John


Nov 21 '05 #1
4 2461
Hi John,

I really don't think it's possible and I'd be pleased to find out that it
is, in fact, possible.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
ci**************@msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"JohnR" <Jo******@hotmail.com> wrote in message
news:e8pPe.4205$IG2.1703@trndny01...
Hi, I have a VB.Net application with Visual Foxpro DBF free tables. So
each table has a DBF and CDX file. I am using the vfpoledb.1 provider in
an Oledb environment to access the tables. I have a need to
programmatically determine what DBF fields are associated with the index
in the table. I am using the stmt:
Dim dtSchema As DataTable = MyDataReader.GetSchemaTable

to retrieve attributes of the DBF file such as fieldname, fieldtype, and
fieldsize. However, I can't find any reference to the indexes that are
associated with it.

Can anybody explain how I might query the CDX file to find out what
indexes are defined for the DBF file at runtime?

Thanks, John

Nov 21 '05 #2
Hi Cindy,

Thanks for the reply... Unfortunately your answer is what I suspected.
Right now I'm cheating and created a function that will pass me back an
array with the fieldnames that compose the primary key... I have to do it
manually based on tablename, however. Ugh! But it does work...

Regards,
John
"Cindy Winegarden" <ci**************@msn.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
Hi John,

I really don't think it's possible and I'd be pleased to find out that it
is, in fact, possible.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
ci**************@msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"JohnR" <Jo******@hotmail.com> wrote in message
news:e8pPe.4205$IG2.1703@trndny01...
Hi, I have a VB.Net application with Visual Foxpro DBF free tables. So
each table has a DBF and CDX file. I am using the vfpoledb.1 provider in
an Oledb environment to access the tables. I have a need to
programmatically determine what DBF fields are associated with the index
in the table. I am using the stmt:
Dim dtSchema As DataTable = MyDataReader.GetSchemaTable

to retrieve attributes of the DBF file such as fieldname, fieldtype, and
fieldsize. However, I can't find any reference to the indexes that are
associated with it.

Can anybody explain how I might query the CDX file to find out what
indexes are defined for the DBF file at runtime?

Thanks, John


Nov 21 '05 #3
Hi John,

I really don't think it's possible and I'd be pleased to find out that it
is, in fact, possible.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
ci**************@msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"JohnR" <Jo******@hotmail.com> wrote in message
news:e8pPe.4205$IG2.1703@trndny01...
Hi, I have a VB.Net application with Visual Foxpro DBF free tables. So
each table has a DBF and CDX file. I am using the vfpoledb.1 provider in
an Oledb environment to access the tables. I have a need to
programmatically determine what DBF fields are associated with the index
in the table. I am using the stmt:
Dim dtSchema As DataTable = MyDataReader.GetSchemaTable

to retrieve attributes of the DBF file such as fieldname, fieldtype, and
fieldsize. However, I can't find any reference to the indexes that are
associated with it.

Can anybody explain how I might query the CDX file to find out what
indexes are defined for the DBF file at runtime?

Thanks, John

Nov 21 '05 #4
Hi Cindy,

Thanks for the reply... Unfortunately your answer is what I suspected.
Right now I'm cheating and created a function that will pass me back an
array with the fieldnames that compose the primary key... I have to do it
manually based on tablename, however. Ugh! But it does work...

Regards,
John
"Cindy Winegarden" <ci**************@msn.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
Hi John,

I really don't think it's possible and I'd be pleased to find out that it
is, in fact, possible.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
ci**************@msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"JohnR" <Jo******@hotmail.com> wrote in message
news:e8pPe.4205$IG2.1703@trndny01...
Hi, I have a VB.Net application with Visual Foxpro DBF free tables. So
each table has a DBF and CDX file. I am using the vfpoledb.1 provider in
an Oledb environment to access the tables. I have a need to
programmatically determine what DBF fields are associated with the index
in the table. I am using the stmt:
Dim dtSchema As DataTable = MyDataReader.GetSchemaTable

to retrieve attributes of the DBF file such as fieldname, fieldtype, and
fieldsize. However, I can't find any reference to the indexes that are
associated with it.

Can anybody explain how I might query the CDX file to find out what
indexes are defined for the DBF file at runtime?

Thanks, John


Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Svend Andreas Horgen | last post by:
I used to believe I fully understood sessions... Apparently PHP does not handles numeric indexes in $_SESSION, as far as I can see. The same yields for both PHP 4 and 5. Suggestions or explanations...
4
by: bwmiller16 | last post by:
Guys - I'm doing a database consistency check for a client and I find that they're building unique indexes for performance/query reasons where they could be using non-unique indexes. Note...
1
by: Top Gun | last post by:
I have a DataSet containing a Parent/Child relationship that has been populated by Sql Server. I have an expectation that certain child records should exist for each parent based upon column data....
8
by: Gabe Moothart | last post by:
Hi, I'm writing a windows service which interacts with a separate process. Basically, it calls a process which creates a file, and then my service reads that file. The problem is, the external...
0
by: John Shum | last post by:
I prepare an user control, which require a validation summary exist in the page where the control located. Any idea on how to determine if any ValidationSummary control exist in the page, as the...
5
by: Shiraz | last post by:
Is there some manual on how to make indexes? for example: table is create mytable ( a varchar, b varchar, c int, d int
1
by: orp | last post by:
We've been struggling on how to determine if a local user is already in a local group. We have code (C#) that creates a local user, if the user doesn't already exist. And, we have code (C#) that...
22
by: Zamdrist | last post by:
I am tasked with maintaining a large database still on SQL Server 7.0. Performance is an issue not surprisingly and I've targeted two rather large tables to see what I can do with the indexes. ...
1
by: mark_aok | last post by:
Hi all, I have a situation where I need to determine a specific table's primary key, and then output it. I have tried the Database Object, and the Record Object, but I've had no luck. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.