Re: Is this possible?
- From: Rush Strong <rpstrong@xxxxxxxxx>
- Date: Fri, 25 Apr 2008 14:10:57 GMT
USE IN TableName
is the "specifically FoxPro command" for closing TableName, regardless of which work area it's in.
- Rush
B. Chernick wrote:
I do an Open, Use TableName, a Pack TableName, and then a Close in the Finally clause (so it always gets called)..
(I don't recognize this 'Use In' you refer to. What is that?)
It occurs to me that the Close I am referring to is the Close of the OleDB connection object . Are you saying that I need some other specifically FoxPro command to close the table before I close the connection?
"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?:
"Anders Altberg" wrote:DBF
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: B. Chernick
- 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
- Re: Is this possible?
- From: B. Chernick
- Is this possible?
- Prev by Date: Re: Is this possible?
- Next by Date: Re: Is this possible?
- Previous by thread: Re: Is this possible?
- Next by thread: Re: Is this possible?
- Index(es):