RE: VFPOLEDB: works with DB on my machine but not with network server
- From: Jim Walsh <JimWalsh@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 4 Apr 2006 15:20:02 -0700
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:
The following is transcript of an exchange that I have had in a VFP.
newsgroup. I'm beginning to think my problem is not a VFP problem, but an OLE
DB problem. So, I am reposting this material here.
Thanks in advance for your consideration.
Jim
===========================================
"Cindy Winegarden" 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,
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@xxxxxxx www.cindywinegarden.com
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
- Follow-Ups:
- Re: VFPOLEDB: works with DB on my machine but not with network server
- From: Cindy Winegarden
- Re: VFPOLEDB: works with DB on my machine but not with network server
- References:
- Prev by Date: VFPOLEDB: works with DB on my machine but not with network server
- Next by Date: Re: OleDbDataAdapter
- Previous by thread: VFPOLEDB: works with DB on my machine but not with network server
- Next by thread: Re: VFPOLEDB: works with DB on my machine but not with network server
- Index(es):