I've written an application in VC++ in VS2005 that includes access to a VFP 9
database using ADO and the VFPOLEDB driver.

I'm using ADO (msado15.dll).

What is odd is that this application works fine when the VFP database is on
my own computer, but when it is on the network server, and I attempt to open
the RecordSet, I get an error saying "Feature is not available".

To test this outside of my own program, I used Excel, Import External Data,
and its Data Connection Wizard to create the connection to my database on the
server. When I click Test Connection, I get a message saying connection
succeeded. I then select Access permissions Read and Share Deny None. The
window that would allow me to select the table to use is empty.

If I repeat this using the VFP database on my own computer, the window lists
all of the tables in the database.

The database on my computer is a copy of the one on the network server.

I am logged into the network using an administrative account.

I can use VFP, and open the database on the server from my computer without
a problem.

I would appreciate your help.

Thanks,

Re: VC++ ADO VFPOLEDB: DB locally works; DB on NT server does not by Cindy

Cindy
Mon Apr 03 14:13:04 CDT 2006

Hi Jim,

As you've realized, you've got a permissions issue. ADO seems to be using a
different user than you when you access the data. Have you tried specifying
a password in the connection string? Is there anything in your AppConfig
file that might influence security permissions?

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@msn.com www.cindywinegarden.com


"Jim Walsh" <JimWalsh@discussions.microsoft.com> wrote in message
news:E10FEF14-C64A-41ED-A3FA-0087EB6F5E61@microsoft.com...
> I've written an application in VC++ in VS2005 that includes access to a
> VFP 9
> database using ADO and the VFPOLEDB driver.
>
> I'm using ADO (msado15.dll).
>
> What is odd is that this application works fine when the VFP database is
> on
> my own computer, but when it is on the network server, and I attempt to
> open
> the RecordSet, I get an error saying "Feature is not available".
>
> To test this outside of my own program, I used Excel, Import External
> Data,
> and its Data Connection Wizard to create the connection to my database on
> the
> server. When I click Test Connection, I get a message saying connection
> succeeded. I then select Access permissions Read and Share Deny None. The
> window that would allow me to select the table to use is empty.
>
> If I repeat this using the VFP database on my own computer, the window
> lists
> all of the tables in the database.
>
> The database on my computer is a copy of the one on the network server.
>
> I am logged into the network using an administrative account.
>
> I can use VFP, and open the database on the server from my computer
> without
> a problem.
>
> I would appreciate your help.
>
> Thanks,
>



Re: VC++ ADO VFPOLEDB: DB locally works; DB on NT server does not by JimWalsh

JimWalsh
Mon Apr 03 14:51:02 CDT 2006

Hi Cindy,

Thanks for taking the time to respond to my posting.

Yes, it seems like a permission issue to me, but I don't know specifically
where. The VFP database itself doesn't have a password on it, although the
application that normally accesses the database does require a user password.
So, I don't think that is where the permission issue lies. For example, I can
open and manipulate the database on the server using the VFP development
system without any passwords.

But, you raise the question of ADO (and VFPOLEDB) permissions or user. Do
you know of I way that I can check on that?

Note that Excel (using VFPOLEDB) seems able to connect to the database, but
also has trouble beyond that.

Are there any debugging tools (like ODBC tracing) that can be used to tease
this problem apart?

Jim


"Cindy Winegarden" wrote:

> Hi Jim,
>
> As you've realized, you've got a permissions issue. ADO seems to be using a
> different user than you when you access the data. Have you tried specifying
> a password in the connection string? Is there anything in your AppConfig
> file that might influence security permissions?
>
> --
> Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
> cindy_winegarden@msn.com www.cindywinegarden.com
>
>
> "Jim Walsh" <JimWalsh@discussions.microsoft.com> wrote in message
> news:E10FEF14-C64A-41ED-A3FA-0087EB6F5E61@microsoft.com...
> > I've written an application in VC++ in VS2005 that includes access to a
> > VFP 9
> > database using ADO and the VFPOLEDB driver.
> >
> > I'm using ADO (msado15.dll).
> >
> > What is odd is that this application works fine when the VFP database is
> > on
> > my own computer, but when it is on the network server, and I attempt to
> > open
> > the RecordSet, I get an error saying "Feature is not available".
> >
> > To test this outside of my own program, I used Excel, Import External
> > Data,
> > and its Data Connection Wizard to create the connection to my database on
> > the
> > server. When I click Test Connection, I get a message saying connection
> > succeeded. I then select Access permissions Read and Share Deny None. The
> > window that would allow me to select the table to use is empty.
> >
> > If I repeat this using the VFP database on my own computer, the window
> > lists
> > all of the tables in the database.
> >
> > The database on my computer is a copy of the one on the network server.
> >
> > I am logged into the network using an administrative account.
> >
> > I can use VFP, and open the database on the server from my computer
> > without
> > a problem.
> >
> > I would appreciate your help.
> >
> > Thanks,
> >
>
>
>

Re: VC++ ADO VFPOLEDB: DB locally works; DB on NT server does not by JimWalsh

JimWalsh
Tue Apr 04 14:31:02 CDT 2006

Hi Cindy,

I double-checked permissions, and can not see anything amiss.

I have begun testing this problem with Excel's Data Import using Microsoft's
OLE DB Provider for Visual FoxPro. In this way, I let it build the connection
string, and allows me to distinguish between my program and the components
connecting to the database (ADO and VFPOLEBB).

Here is more information about my testing.

As I mentioned in my original post, I am able to work with the database as
it is stored on my own computer, but not with the copy of the database that
is stored on our network server, a Win NT 4 SP6 system.

I am in the process of setting up a new server, based on Win2K3. So, I
copied my copy of the database to a folder there. That worked just fine both
with Excel, and my application. I then deleted the contents of the database
folder on the Win2K3 machine, and copied the database from the Win NT machine
into the same folder on the Win2K3 folder. Now, access to the database (on
the Win2K3 machine) worked with both Excel and my program.

At the present time, the connection string to the database is hard-coded in
my program. I will make this more user-friendly when I get the bugs worked
out. But, a simple way to add some flexibility was to change the connection
string to use a mapped drive letter instead of the actual path, i.e.
T:\MyDatabase.dbc. Then, I could change the database being used by changing
the mapping without changing my program.

But, this didn't work either with my program, nor with Excel. My program
give the same error message as before: "Feature is not available". Excel's
Test Connection button succeeds, but it is unable to list the tables in the
database.

So, I backed up, and restored the original connection string, i.e.
\\GSCSERVER\DBFolder\MyDatabase.dbc. This no longer worked in my program, nor
Excel.

Seems like something is happening to the database to prevent working with it
using VFPOLEDB. However, it continues to be accessible to me using the Visual
FoxPro Development system.

Two questions:

1. Any idea of what is going on here?

2. Are there any tools available for getting more information about what is
going on? For example, like ODBC tracing. Or, is there a debug version of
VFPOLEDB. The error message is coming from someplace, but where? And, what
does it mean?

Thanks again,
Jim


"Cindy Winegarden" wrote:

> Hi Jim,
>
> As you've realized, you've got a permissions issue. ADO seems to be using a
> different user than you when you access the data. Have you tried specifying
> a password in the connection string? Is there anything in your AppConfig
> file that might influence security permissions?
>
> --
> Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
> cindy_winegarden@msn.com www.cindywinegarden.com
>
>
> "Jim Walsh" <JimWalsh@discussions.microsoft.com> wrote in message
> news:E10FEF14-C64A-41ED-A3FA-0087EB6F5E61@microsoft.com...
> > I've written an application in VC++ in VS2005 that includes access to a
> > VFP 9
> > database using ADO and the VFPOLEDB driver.
> >
> > I'm using ADO (msado15.dll).
> >
> > What is odd is that this application works fine when the VFP database is
> > on
> > my own computer, but when it is on the network server, and I attempt to
> > open
> > the RecordSet, I get an error saying "Feature is not available".
> >
> > To test this outside of my own program, I used Excel, Import External
> > Data,
> > and its Data Connection Wizard to create the connection to my database on
> > the
> > server. When I click Test Connection, I get a message saying connection
> > succeeded. I then select Access permissions Read and Share Deny None. The
> > window that would allow me to select the table to use is empty.
> >
> > If I repeat this using the VFP database on my own computer, the window
> > lists
> > all of the tables in the database.
> >
> > The database on my computer is a copy of the one on the network server.
> >
> > I am logged into the network using an administrative account.
> >
> > I can use VFP, and open the database on the server from my computer
> > without
> > a problem.
> >
> > I would appreciate your help.
> >
> > Thanks,
> >
>
>
>

RE: VC++ ADO VFPOLEDB: DB locally works; DB on NT server does not by JimWalsh

JimWalsh
Tue Apr 04 17:20:02 CDT 2006

I finally got this to work.

When I compared the copy of the database on the server, that was not
working, with the version that was on my development computer, I noticed that
the version that was not working had stored procedures for handling two
events: BeforeTableOpen, and AfterTableOpen. I put this code in a long time
ago for debugging purposes. All it does it output a debug string. However,
when I commented out these two procedures, the database on the server now
works.

Any idea why this was causing a problem?

Thanks again for your thoughts.
Jim


"Jim Walsh" wrote:

> I've written an application in VC++ in VS2005 that includes access to a VFP 9
> database using ADO and the VFPOLEDB driver.
>
> I'm using ADO (msado15.dll).
>
> What is odd is that this application works fine when the VFP database is on
> my own computer, but when it is on the network server, and I attempt to open
> the RecordSet, I get an error saying "Feature is not available".
>
> To test this outside of my own program, I used Excel, Import External Data,
> and its Data Connection Wizard to create the connection to my database on the
> server. When I click Test Connection, I get a message saying connection
> succeeded. I then select Access permissions Read and Share Deny None. The
> window that would allow me to select the table to use is empty.
>
> If I repeat this using the VFP database on my own computer, the window lists
> all of the tables in the database.
>
> The database on my computer is a copy of the one on the network server.
>
> I am logged into the network using an administrative account.
>
> I can use VFP, and open the database on the server from my computer without
> a problem.
>
> I would appreciate your help.
>
> Thanks,
>

Re: VC++ ADO VFPOLEDB: DB locally works; DB on NT server does not by Dan

Dan
Tue Apr 04 17:37:14 CDT 2006

That actually makes sense now. The OLE-DB provider doesn't support screen
I/O.

There's a help topic that lists unsupported commands & functions.

Dan

Jim Walsh wrote:
> I finally got this to work.
>
> When I compared the copy of the database on the server, that was not
> working, with the version that was on my development computer, I
> noticed that the version that was not working had stored procedures
> for handling two events: BeforeTableOpen, and AfterTableOpen. I put
> this code in a long time ago for debugging purposes. All it does it
> output a debug string. However, when I commented out these two
> procedures, the database on the server now works.
>
> Any idea why this was causing a problem?
>
> Thanks again for your thoughts.
> Jim
>
>
> "Jim Walsh" wrote:
>
>> I've written an application in VC++ in VS2005 that includes access
>> to a VFP 9 database using ADO and the VFPOLEDB driver.
>>
>> I'm using ADO (msado15.dll).
>>
>> What is odd is that this application works fine when the VFP
>> database is on my own computer, but when it is on the network
>> server, and I attempt to open the RecordSet, I get an error saying
>> "Feature is not available".
>>
>> To test this outside of my own program, I used Excel, Import
>> External Data, and its Data Connection Wizard to create the
>> connection to my database on the server. When I click Test
>> Connection, I get a message saying connection succeeded. I then
>> select Access permissions Read and Share Deny None. The window that
>> would allow me to select the table to use is empty.
>>
>> If I repeat this using the VFP database on my own computer, the
>> window lists all of the tables in the database.
>>
>> The database on my computer is a copy of the one on the network
>> server.
>>
>> I am logged into the network using an administrative account.
>>
>> I can use VFP, and open the database on the server from my computer
>> without a problem.
>>
>> I would appreciate your help.
>>
>> Thanks,