Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OpenTables() freezes client computers opening views
Message
De
22/08/2001 09:32:17
 
 
À
21/08/2001 19:42:36
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00546445
Message ID:
00547198
Vues:
13
>>cPrgFile = "c:\temp\common\sql.prg"
>>do (cPrgFile)
>
>To explain the "why" of Al's answer, although it might be obvious, the FoxPro has to be installed to DO a prg. The runtime will just be able to do already compiled code. Hence the COMPILE command. Which I think was awfully nice of Microsoft to give us (that was VFP 6.0 SP 3, I believe).

I do understand this.

However my code still does not work. I now compile the program and it runs (I have a compiled version left after it runs). However I still do not build the view in the database.

I have reduced the error messages but I still freeze the form when I hit .Opentables().

To recap : I am building a new database on the user's local drive. I try to create a view "create SQL view as select ...." from code. Example below :

create SQL view spec_lv as select spec.specno,spec.sp_suffix,spec.german_no,spec.sp_desc,spec.hid_desc, spec.eq_source,spec.sp_file,spec.sp_datasht,spec.eq_datasht,spec.propspecs, spec.eqspecs,spec.eq_type,spec.eq_design,spec.un_pr_unit,spec.propos_rem, spec.remarks,spec.sp_print,spec.is_equip,spec.project_id,spec.spec_id,spec.fromspc_id,spec.date_chg,spec.time_chg,spec.changed_by,spec.date_add, spec.time_add,spec.added_by
from spec
where project_id = oProject.cProjID or project_id = 'master' and spec_id not in (select fromspc_id from spec having project_id = oProject.cProjID) order by 1


The "create SQL view ... " statement is written to a file and run. Before I failed to compile it and I would get error messages when the code went thru the CursorSetProp section. Something like "view Spec_Lv does not exist".

I added "compile (cPrgFile)" to the code. Now I do not get the error messages when I go thru CursorSetProp section. However when I hit the form load line
= thisform.OpenTables()
the form freezes.

After running with the *.exe program the new database does not contain the view which is of course why the form freezes. (Why does the form freezes, why dont I get an error message?)

It works when I do it from my development system but not when it runs from the *.exe on a user's system (or from mine - I was wrong about that).

In writing all for this I had hoped something new would occur to me. I did try opening the database exclusively, but that did not help.

Any further help is appreciated.
Best Regards
Don Simpson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform