|
| Re: close table... |
 |
Mon, 08 Jan 2007 15:32:13 -080 |
IBenttini wrote:
> THE BELOW IS A PIECE OF CODE OF MINE, TRYING TO CLOSE A TABLE
> BEFORE PACKING IT. I MUST BE DOING SOMETHING WRONG, SINCE I KEEP
> GETTING THE FAMOUS "in use by another". Everything else is
working as it
> should.
> Any help will be grateful.
> IBenttini
>
>
> function PUSHBUTTON12_onClick //create procedue to delete a record
> //Are you sure you want delete this record?
> //Enter password
> //if OK wire the record some where
> //delete it, and pack the table
> cName = form.entryfield1.value
>
> cRet=msgbox("Are you sure you want DELETE this record,;
> Yes/No?","Alert",4+32)
> if cRet = 6
> // open form to accept Password
> set procedure to Password.wfm additive //PASSWORD.cc must exist
> fChild=new Passwrdform()
> fChild.parentform=form
> fChild.mdi=false
> fChild.readModal()
> //the below statement will flag for delete the record in view.
> r=form.abdatamoddatamodule1.abaddressbook1.rowset
> r.delete()
// the table is not closed at this point:
r.parent.active := false
>
>
> //the below statement according to HELP, should Pack
> // AddressBook table, however it does NOT, because it still open.
> // I need a statement here to close the table using OODML method.
> // so that my statement below work.
>
> _app.databases[1].packTable("AddressBook.dbf")
> //in use by another is what I am getting now.
// reactivate it:
r.parent.active := true
> else
> endif
> return
Hope that helps.
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
|
| Post Reply
|
| Re: close table... |
 |
Mon, 8 Jan 2007 16:49:19 -0800 |
form.rowsetName.active = false
pack
form.rowsetName.active = true
That should do the trick as long as there are not other forms opened with
these tables or table.
HTH
Greg Hill
"IBenttini" <hpbenttini@hotmail.com> wrote in message
news:O%23rfRQ3MHHA.1216@news-server...
> THE BELOW IS A PIECE OF CODE OF MINE, TRYING TO CLOSE A TABLE
> BEFORE PACKING IT. I MUST BE DOING SOMETHING WRONG, SINCE I KEEP
> GETTING THE FAMOUS "in use by another". Everything else is
working as it
> should.
> Any help will be grateful.
> IBenttini
>
>
> function PUSHBUTTON12_onClick //create procedue to delete a record
> //Are you sure you want delete this record?
> //Enter password
> //if OK wire the record some where
> //delete it, and pack the table
> cName = form.entryfield1.value
>
> cRet=msgbox("Are you sure you want DELETE this record,;
> Yes/No?","Alert",4+32)
> if cRet = 6
> // open form to accept Password
> set procedure to Password.wfm additive //PASSWORD.cc must exist
> fChild=new Passwrdform()
> fChild.parentform=form
> fChild.mdi=false
> fChild.readModal()
> //the below statement will flag for delete the record in view.
> r=form.abdatamoddatamodule1.abaddressbook1.rowset
> r.delete()
>
>
> //the below statement according to HELP, should Pack
> // AddressBook table, however it does NOT, because it still open.
> // I need a statement here to close the table using OODML method.
> // so that my statement below work.
>
> _app.databases[1].packTable("AddressBook.dbf")
> //in use by another is what I am getting now.
> else
> endif
> return
>
> THE ABOVE IS A PIECE OF CODE OF MINE, TRYING TO CLOSE A TABLE
> BEFORE PACKING IT. i MUSR BE DOING SOMETHING WRONG, SINCE I KEEP
> GETTING THE FAMOUS "in use by another".Everything else is working
as it
> should.
> Any help will be greatful.
> IBenttini
>
|
| Post Reply
|
| close table... |
 |
Mon, 8 Jan 2007 17:13:58 -0500 |
THE BELOW IS A PIECE OF CODE OF MINE, TRYING TO CLOSE A TABLE
BEFORE PACKING IT. I MUST BE DOING SOMETHING WRONG, SINCE I KEEP
GETTING THE FAMOUS "in use by another". Everything else is working as
it
should.
Any help will be grateful.
IBenttini
function PUSHBUTTON12_onClick //create procedue to delete a record
//Are you sure you want delete this record?
//Enter password
//if OK wire the record some where
//delete it, and pack the table
cName = form.entryfield1.value
cRet=msgbox("Are you sure you want DELETE this record,;
Yes/No?","Alert",4+32)
if cRet = 6
// open form to accept Password
set procedure to Password.wfm additive //PASSWORD.cc must exist
fChild=new Passwrdform()
fChild.parentform=form
fChild.mdi=false
fChild.readModal()
//the below statement will flag for delete the record in view.
r=form.abdatamoddatamodule1.abaddressbook1.rowset
r.delete()
//the below statement according to HELP, should Pack
// AddressBook table, however it does NOT, because it still open.
// I need a statement here to close the table using OODML method.
// so that my statement below work.
_app.databases[1].packTable("AddressBook.dbf")
//in use by another is what I am getting now.
else
endif
return
THE ABOVE IS A PIECE OF CODE OF MINE, TRYING TO CLOSE A TABLE
BEFORE PACKING IT. i MUSR BE DOING SOMETHING WRONG, SINCE I KEEP
GETTING THE FAMOUS "in use by another".Everything else is working as
it
should.
Any help will be greatful.
IBenttini
|
| Post Reply
|
| Re: close table... |
 |
Mon, 8 Jan 2007 20:02:31 -0500 |
Thanks Ken,
Your help let me PACK, and I am gratefull, but I now have a new error
message:
DATA TYPE MISMATCH. EXPECTING OBJECT
in asking the table to be open again: (r.parent.active := false)
Am I missing something?
IBenttini
"Ken Mayer [dBVIPS]" <dbase@_nospam_goldenstag.net> wrote in
message
news:fDka%2373MHHA.1128@news-server...
> IBenttini wrote:
>> THE BELOW IS A PIECE OF CODE OF MINE, TRYING TO CLOSE A TABLE
>> BEFORE PACKING IT. I MUST BE DOING SOMETHING WRONG, SINCE I KEEP
>> GETTING THE FAMOUS "in use by another". Everything else is
working as it
>> should.
>> Any help will be grateful.
>> IBenttini
>>
>>
>> function PUSHBUTTON12_onClick //create procedue to delete a record
>> //Are you sure you want delete this record?
>> //Enter password
>> //if OK wire the record some where
>> //delete it, and pack the table
>> cName = form.entryfield1.value
>>
>> cRet=msgbox("Are you sure you want DELETE this record,;
>> Yes/No?","Alert",4+32)
>> if cRet = 6
>> // open form to accept Password
>> set procedure to Password.wfm additive //PASSWORD.cc must
exist
>> fChild=new Passwrdform()
>> fChild.parentform=form
>> fChild.mdi=false
>> fChild.readModal()
>> //the below statement will flag for delete the record in
view.
>> r=form.abdatamoddatamodule1.abaddressbook1.rowset
>> r.delete()
>
> // the table is not closed at this point:
> r.parent.active := false
>
>>
>>
>> //the below statement according to HELP, should Pack
>> // AddressBook table, however it does NOT, because it still
>> open.
>> // I need a statement here to close the table using OODML
>> method.
>> // so that my statement below work.
>>
>> _app.databases[1].packTable("AddressBook.dbf")
>> //in use by another is what I am getting now.
>
> // reactivate it:
> r.parent.active := true
>
>> else
>> endif
>> return
>
> Hope that helps.
>
> Ken
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/dbase/dBASEBook.htm
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase
|
| Post Reply
|
| Re: close table... |
 |
Mon, 8 Jan 2007 20:32:29 -0500 |
thanks Greg, but the close stattement did not work. (
form.rowsetName.active = true ), and I dont know why?, any more
sugestions?
Is rowsetName to be use literal or the name of something else?
IBenttini
"Greg Hill" <ghill123@hotmail.com> wrote in message
news:enu77s.608.1@news.alldbase.com...
> form.rowsetName.active = false
> pack
> form.rowsetName.active = true
>
> That should do the trick as long as there are not other forms opened with
> these tables or table.
>
> HTH
>
> Greg Hill
>
>
> "IBenttini" <hpbenttini@hotmail.com> wrote in message
> news:O%23rfRQ3MHHA.1216@news-server...
>> THE BELOW IS A PIECE OF CODE OF MINE, TRYING TO CLOSE A TABLE
>> BEFORE PACKING IT. I MUST BE DOING SOMETHING WRONG, SINCE I KEEP
>> GETTING THE FAMOUS "in use by another". Everything else is
working as it
>> should.
>> Any help will be grateful.
>> IBenttini
>>
>>
>> function PUSHBUTTON12_onClick //create procedue to delete a record
>> //Are you sure you want delete this record?
>> //Enter password
>> //if OK wire the record some where
>> //delete it, and pack the table
>> cName = form.entryfield1.value
>>
>> cRet=msgbox("Are you sure you want DELETE this record,;
>> Yes/No?","Alert",4+32)
>> if cRet = 6
>> // open form to accept Password
>> set procedure to Password.wfm additive //PASSWORD.cc must
exist
>> fChild=new Passwrdform()
>> fChild.parentform=form
>> fChild.mdi=false
>> fChild.readModal()
>> //the below statement will flag for delete the record in view.
>> r=form.abdatamoddatamodule1.abaddressbook1.rowset
>> r.delete()
>>
>>
>> //the below statement according to HELP, should Pack
>> // AddressBook table, however it does NOT, because it still
open.
>> // I need a statement here to close the table using OODML
method.
>> // so that my statement below work.
>>
>> _app.databases[1].packTable("AddressBook.dbf")
>> //in use by another is what I am getting now.
>> else
>> endif
>> return
>>
>> THE ABOVE IS A PIECE OF CODE OF MINE, TRYING TO CLOSE A TABLE
>> BEFORE PACKING IT. i MUSR BE DOING SOMETHING WRONG, SINCE I KEEP
>> GETTING THE FAMOUS "in use by another".Everything else is
working as it
>> should.
>> Any help will be greatful.
>> IBenttini
>>
>
>
|
| Post Reply
|
|
|