Re: Is this possible?
- From: B. Chernick <BChernick@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 25 Apr 2008 07:11:00 -0700
It occurs to me that I have not performed an obvious test.
Given the current condition of the program (doing an Open/Use
Exclusive/Pack/Close connection.) what I can and have done is run the pack
routine and then (while the app is still running) try to open one of the
involved dbf tables in Exclusive mode using the FoxPro 6 IDE.
I have tried this on both my local machine (where the routine works
correctly) and the web server (where it crashes). In both cases I am able to
open the table in exclusive mode through the IDE so it looks like the tables
are being closed.
"swdev2" wrote:
A pack takes exclusive control of a table..
If you don't CLOSE the table after packing it, ie - you still have it open,
then NO ONE ELSE can get to it for any 'exclusive' file i/o.
I'd check that you're actually CLOSING the file after the pack.
"PACK Tablename", right ?
then
"Use in (Tablename) "
It's not enough just to destroy the data connector by 'exiting' the
program - it will hang around in the server memory after it was 'destroyed'
for a bit.
HTH !
Mondo Regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.terrafox.net www.viasqlserver.net
"B. Chernick" <BChernick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AA92E00B-91D1-49FF-8B69-4B1E1414E24D@xxxxxxxxxxxxxxxx
I may have spoken too soon. The program works fine on my local machine.If
I run it on our web server, it crashes with the message: 'Command containsthis
unrecognized phrase/keyword.'
This may be premature. I'm told that the users on that server are now
having permission problems, unable to read/write to the tables through
app, or something like that, and I'm going to wait for that to be fixed.But
could this cause a problem like that?http://support.microsoft.com/kb/932201
Or is this a more likely possibility?:
DBF
"Anders Altberg" wrote:
dcc.CommandText = "PACK Tablename"
-Anders
"B. Chernick" <BChernick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DD5D2842-752F-4845-B048-0CF60EA3A0F5@xxxxxxxxxxxxxxxx
We have a temporary Dot Net 2.0 web app that connects to some FoxPro 6
atables. I've been asked to enhance it. All I am trying to do is put
admitbutton on the main page to run a Pack command. So far no luck. I
thethat
I have not done much with direct ado.net connections lately. This is
basically the code.
Dim dc As New OleDb.OleDbConnection(<same connection string used in
inrest of the app>)
dc.Open()
Dim dcc As New OleDb.OleDbCommand("Use <Filename.dbf> Exclusive", dc)
dcc.ExecuteNonQuery
dcc.CommandText = "Pack"
dcc.ExecuteNonQuery
It only crashes on the Pack call, with an error of "No table is open
numberthe
current work area."
(Incidentally, the first ExecuteNonQuery command is returning the
of
rows in the target FoxPro table so I would assume that command did run
successfully.)
- Follow-Ups:
- Re: Is this possible?
- From: swdev2
- Re: Is this possible?
- References:
- Is this possible?
- From: B. Chernick
- Re: Is this possible?
- From: Anders Altberg
- Re: Is this possible?
- From: B. Chernick
- Re: Is this possible?
- From: swdev2
- Is this possible?
- Prev by Date: Re: Is this possible?
- Next by Date: Re: Program to read the regional settings
- Previous by thread: Re: Is this possible?
- Next by thread: Re: Is this possible?
- Index(es):