Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error # 1548 ?????
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00191636
Message ID:
00191850
Views:
19
>Hi,
>
>I have a "Clients" maintenance form that has 3 pages in a pageframe. The first one is a list of clients (cBizObjMaintenanceForm), the second one is a detail of the "Clients" data and in the third one I have a cListObjEdit object that lists all the "Attentions" of a "Client". In the corresponding cListObjEditForm I have the "Attentions" data (name, department, etc...) and 3 cListObjEdit objects to store "Attentions" "Telephones", "Faxes" and "Emails". One of the "Attentions" fields is a pre-name treatment (like Mr.) and a post-name treatment (like PHD) that are selected by comboboxes based on a View.
>The problem is that when the Views are indexed I receive the error 1548 and when the Views are not indexed everything works fine.
>The error occurs when I insert a new "Attention" and after saving the new record I try to edit it.
>
>The error message is :
>
>Table "alias" has one or more non-structural indexes open. Please close them and retry the Begin Transaction (Error 1548)
>
>Any tips ???
>
>Regards,

José,

I've had the same problem once. I'll detail it first, then the solution...

--------------------------------------
Table "alias" has one or more non-structural indexes open. Please close them and retry the Begin Transaction (Error 1548)

Did someone come across this one already ? It’s new for me <g>. Happens when I try to update a table from a view, as soon as the code in the update trigger hits the « BEGIN TRANSACTION » line.
As usual the message is very informative. The view is indexed (to a temp CDX) and if I remove the indexes, the problem is still there. The table is indexed, as you may imagine, but uses a conventional CDX.

Happens on the primary bizobj of a cBizObjForm with several bizObjs on it.
----------------------------------
The solution…

I have 2 different bizobjs with several common controls. One that accepts the search parameters and another to display the information.

Some of these common controls are based on a subclass of cifCombobox (a cifComboBox based on a view rather than on a cursor). In order to have this design work properly I need to index the view.
This was done in the init() of the DataEnvironments definitions.

The problem is that the views were indexed 2 times and this produced 2 different indexes on the same field, enough to make the RI code bomb ! The trick is to bracket the indexing as follows :

IF EMTPY(TAG(1))
INDEX ON ... TAG ...
ENDIF

Jose

**************************************************
*-- Class: cifviewcombobox (c:\cdbk30\common30\libs\ccustctl.vcx)
*-- ParentClass: cifcombobox (c:\cdbk30\common30\libs\ccustctl.vcx)
*-- BaseClass: combobox
*-- a specialized cifcombobox using views
*
#INCLUDE "c:\cdbk30\common30\include\framincl.h"
*
DEFINE CLASS cifviewcombobox AS cifcombobox


RowSourceType = 2
Name = "cifviewcombobox"


PROCEDURE Init
LOCAL lcTag
lcTag = ALLTRIM(this.cTag)
*-- overwrite the default CifComboBox code to take my changes
*-- into account
*-- Validate the tag
IF !IsTag(this.cTag, this.cAlias)
this.lInitialized = .F.
WAIT WINDOW NOWAIT TAGNOTFOUND_LOC + CHR(13) + lcTag
ENDIF

this.requery()
NODEFAULT
ENDPROC


PROCEDURE Requery
LOCAL lnOldSel
lnOldSel = SELECT()
SELECT (this.rowSource)
REQUERY()
SELECT (lnOldSel)
ENDPROC


PROCEDURE copyright
*---------------------- Location Section ----------------------
* Library...........:
* Class.............: Cifviewcombobox
* Method............:
*-------------------------- Copyright -------------------------
* Author............: José Constant
* Project...........: PROSAL
* Created...........: 17/03/98 14:17:39
* Copyright.........: (c) Terre-Engineering S.A. , 1998
*----------------------- Usage Section ------------------------
*) Description.......: This is a specialized cifComboBox
* : It's based on a view
* Scope.............:
* Parameters........:
*$ Usage.............:
*â0Example...........:
* Returns...........:
*------------------- Maintenance Section ----------------------
*@ Inputs:...........:
* Outputs...........:
* Pre-condt. invar..: Be sure to fill in the following properties
* : BoundColumn: the select order of the unique id field in the view (ex: 1)
* : cAlias: the view name, with "r" or "v" removed (ex: "v_Dojo"
* : cField: the name of the field you want to display in the combo when closed
* : (ex: " cClubNo")
* : cTag: the name of the index tag that will be used for the lookup (ex: "ClubNo")
* : YOU MUST INDEX THE VIEW AND CTAG MUST BE THE CURRENT ORDER!
* Post-condt.invar..:
*? Notes.............: None
* Collab.methods....: None
*--Process...........:
* Change log........:
*--------------------------------------------------------------
ENDPROC


ENDDEFINE
*
*-- EndDefine: cifviewcombobox
**************************************************
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform