Author: Richard Canning
Posted: 2000-02-18 11:10:48 Link
Hi All,
I have an ibaseform which contains an icontainer control which contains controls subclassed from the isecctl class library.I'm using SQL statements to load data from my local database tables into cursors and setting my controls' rowsource properties to these cursors.
The problem I'm having occurs when I attempt to run a method I created. The method first uses a table exclusively, creates a cursor on certain filters on the table, unuses that cursor, then performs a delete operation, issues a pack command, performs an insert operation (SQL - Insert clause), sets exclusive off, then unuses the table. After the method executes and I move my mouse around the form or click the close button, I get the Error: "Cannot acces the selected table (Error 1152)" message pop up. Funny thing is that the method executes its function perfectly.
I've tried switching work areas and not unusing the table in question, the same result. There is no data environment set here, and the data session only shows the cursors I've created using the SQL - SELECT clauses. Does anyone have any idea what could be going on here?
Regards,
Richard Canning
Atlantic DataSystems Inc.
St. John's, NF. Canada
Author: Javed Aslam
Posted: 2000-02-19 12:13:31 Link
<I><FONT COLOR="#663300">Hi All,
I have an ibaseform which contains an icontainer control which contains controls subclassed from the isecctl class library.I'm using SQL statements to load data from my local database tables into cursors and setting my controls' rowsource properties to these cursors.
The problem I'm having occurs when I attempt to run a method I created. The method first uses a table exclusively, creates a cursor on certain filters on the table, unuses that cursor, then performs a delete operation, issues a pack command, performs an insert operation (SQL - Insert clause), sets exclusive off, then unuses the table. After the method executes and I move my mouse around the form or click the close button, I get the Error: "Cannot acces the selected table (Error 1152)" message pop up. Funny thing is that the method executes its function perfectly.
I've tried switching work areas and not unusing the table in question, the same result. There is no data environment set here, and the data session only shows the cursors I've created using the SQL - SELECT clauses. Does anyone have any idea what could be going on here?
Regards,</FONT></I>
Richard,
I have encountered this error many times, and everytime it leaves me bald while trying to find the cause. This is one of those things where the debugger is also of little help. The times when I have seen this is when on the same form I have 2 or more instances of the same ComboBox, usually on different pages, with the rowsource of each set to the same cursor. In such cases, whenever I have changed the 'name' of the cursor in one of the rowsources to something different, even though it contains the same exact data, the error disappears.
HTH
Regards
Javed
Author: Richard Canning
Posted: 2000-02-19 12:41:23 Link
<I><FONT COLOR="#663300"><I><FONT COLOR="#663300">Hi All,
I have an ibaseform which contains an icontainer control which contains controls subclassed from the isecctl class library.I'm using SQL statements to load data from my local database tables into cursors and setting my controls' rowsource properties to these cursors.
The problem I'm having occurs when I attempt to run a method I created. The method first uses a table exclusively, creates a cursor on certain filters on the table, unuses that cursor, then performs a delete operation, issues a pack command, performs an insert operation (SQL - Insert clause), sets exclusive off, then unuses the table. After the method executes and I move my mouse around the form or click the close button, I get the Error: "Cannot acces the selected table (Error 1152)" message pop up. Funny thing is that the method executes its function perfectly.
I've tried switching work areas and not unusing the table in question, the same result. There is no data environment set here, and the data session only shows the cursors I've created using the SQL - SELECT clauses. Does anyone have any idea what could be going on here?
Regards,</FONT></I>
Richard,
I have encountered this error many times, and everytime it leaves me bald while trying to find the cause. This is one of those things where the debugger is also of little help. The times when I have seen this is when on the same form I have 2 or more instances of the same ComboBox, usually on different pages, with the rowsource of each set to the same cursor. In such cases, whenever I have changed the 'name' of the cursor in one of the rowsources to something different, even though it contains the same exact data, the error disappears.
HTH
Regards
Javed
</FONT></I>
Javed,
<I><FONT COLOR="#663300">"This is one of those things where the debugger is also of little help."
</FONT></I>
Tell me about it. I personally think the FoxPro debugger needs some major improvements to be of "any" help.
I fixed the problem by closing the table immediately after performing the delete and pack commands. My form doesn't have multiple instances of the same combobox nor do 2 comboboxes share the same cursor in their rowsource properties. I think we get the same error for different reasons here. Anyway, thanks for the tip, I bet it will be usefull soon enough.
Richard Canning
Atlantic DataSystems Inc.
St. John's, NF. Canada
Author: Jose Constant
Posted: 2000-02-20 12:19:48 Link
<I><FONT COLOR="#663300"><I><FONT COLOR="#663300"><I><FONT COLOR="#663300">Hi All,
I have an ibaseform which contains an icontainer control which contains controls subclassed from the isecctl class library.I'm using SQL statements to load data from my local database tables into cursors and setting my controls' rowsource properties to these cursors.
The problem I'm having occurs when I attempt to run a method I created. The method first uses a table exclusively, creates a cursor on certain filters on the table, unuses that cursor, then performs a delete operation, issues a pack command, performs an insert operation (SQL - Insert clause), sets exclusive off, then unuses the table. After the method executes and I move my mouse around the form or click the close button, I get the Error: "Cannot acces the selected table (Error 1152)" message pop up. Funny thing is that the method executes its function perfectly.
I've tried switching work areas and not unusing the table in question, the same result. There is no data environment set here, and the data session only shows the cursors I've created using the SQL - SELECT clauses. Does anyone have any idea what could be going on here?
Regards,</FONT></I>
Richard,
I have encountered this error many times, and everytime it leaves me bald while trying to find the cause. This is one of those things where the debugger is also of little help. The times when I have seen this is when on the same form I have 2 or more instances of the same ComboBox, usually on different pages, with the rowsource of each set to the same cursor. In such cases, whenever I have changed the 'name' of the cursor in one of the rowsources to something different, even though it contains the same exact data, the error disappears.
HTH
Regards
Javed
</FONT></I>
Javed,
<I><FONT COLOR="#663300">"This is one of those things where the debugger is also of little help."
</FONT></I>
Tell me about it. I personally think the FoxPro debugger needs some major improvements to be of "any" help.
I fixed the problem by closing the table immediately after performing the delete and pack commands. My form doesn't have multiple instances of the same combobox nor do 2 comboboxes share the same cursor in their rowsource properties. I think we get the same error for different reasons here. Anyway, thanks for the tip, I bet it will be usefull soon enough.</FONT></I>
Richard,
I've seen this happen quite a number of times in complex codebook forms with lots of bizness objects on them. Imagine that in Codebook, every bizness object has its own dataenvironment, and does not rely on the standard form dataenv.
The problem had to see with the order in which VFP killed the bizness objects. Imagine you have a combo tied to a table and this table gets closed by one of the dataenv before the combo. I your combo gets the focus for one reason or another it will claim it cannot find the selected table.
There have been several threads about this in the past.
Jose
Jose Constant
Constant Software Systems
Belgium
<a href=http://www.constant.be/css target=_blank>Jose's Web Site</a>
Author: dsb10@lycos.com
Posted: 2012-02-05 10:54:52 Link
Gents
I'm having a
Cannot access the selected table (Error 1152)
Error when releasing a form. All data has been closed with "CLOSE Databases" prior to releasing the form. Any words of wisdom from the VFP gurus?
Thanks
Dennis
--- StripMime Report -- processed MIME parts ---
text/html (html body -- converted)
---
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/2066167013.417118.1328457292295.JavaMail.mail@webmail01
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Author: Tracy Pearson
Posted: 2012-02-05 11:04:47 Link
"dsb10@lycos.com " <dsb10@lycos.com> wrote:
> Gents
>
>
>I'm having a
>Cannot access the selected table (Error 1152)
>Error when releasing a form. All data has been closed with "CLOSE
>Databases" prior to releasing the form. Any words of wisdom from the
>VFP gurus?
>
>
>
>Thanks
>
>
>
>Dennis
>
Do you have tables in the data environment of the form? If the form is a private data session you may not need the close databases command. Otherwise, the environment has a property to not close the tables, AutoCloseTables.
--
Tracy Pearson
PowerChurch Software
Sent with K-9 Mail.
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/427e9fa7-b7c7-455f-9484-daa8bd89e739@email.android.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Author: dsb10@lycos.com
Posted: 2012-02-05 11:23:16 Link
Tracy
Thanks, you hit the nail on the head!
I appreciate the help.
Dennis
On Feb 5, 2012, Tracy Pearson <tracy@powerchurch.com> wrote:
"
dsb10@lycos.com " <
d> wrote:> Gents>>
>I'm having a>Cannot access the selected table (Error 1152)
>Error when releasing a form. All data has been closed with "CLOSE
>Databases" prior to releasing the form. Any words of wisdom from t>VFP gurus?>>>>Thanks&>>>Dennis>Do you have tables i
-- Tracy PowerChurch SoftwareSent with K-9 Mail._____Post Messages to:
ProFox@Subscription Maintenance:
http://leafOT-free version of this list:
http://leafe.com/mailman/listinfo/profoxtechSearch
http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/427e9fa7-b7c7-455f-9484** All postings, unless explicitly
Report [OT] Abuse:
--- StripMime Report -- processed MIME parts ---
text/html (html body -- converted)
---
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/459825341.417539.1328458997034.JavaMail.mail@webmail01
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.