Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This is a weird one...
Message
 
À
28/07/1998 14:23:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00122007
Message ID:
00122073
Vues:
28
That sounds like a good idea but my problem is that I have no idea what the 2.6 tables are called until runtime. The names of the tables are pulled from a different source. I know how to set up an ODBC View through VFP but I'm not sure how to do it at runtime through code so that I can plug in the table names and establish the connection while the exe is running. How difficult is that to do?


>OK, Kevin, how about grabbing the table through a remote view, using an ODBC connection?
>
>
>>Yeah I know, that's what has me baffled too! It's a little involved to explain but the table I open is in a zipped file that is unzipped EVERYTIME before it is used. So the table is ALWAYS clean when I USE it. It is a 2.6 table but I'm not opening it exclusively so VFP doesn't try to convert it. The thing is that if I don't use ON ERROR, VFP opens the table with no complaints but if I do use an ON ERROR DO FORM it complains about not being able to find the CDX!
>>
>>Things that make you go hmmm...
>>
>>>Kevin ---
>>>
>>>I don't think your problem has anything to do with your type of error-trapping. With that error "Structural CDX not found", the default options are Ignore and Cancel. If you Ignore, VFP "forgets" that the table ever had a CDX and all tags are gone. That table will not cause the error to reoccur (unless new index tags are added). So, unlike most other errors, hitting Ignore actually does something: It wipes out the reference to the CDX and the table will not error again. The resolution involves "hard trapping" of that error --- either force a rebuild of the CDX -or- cancel the table opening.
>>>
>>>
>>>
>>>>Ok, I'm totally baffled. I've just written a small error handler routine that is real simple.
>>>>
>>>>ON ERROR DO FORM ErrHand with message(),program(),lineno()
>>>>
>>>>My form then displays the error and does a controlled shutdown of all tables or gives the user the ability to ignore the error if it is minor (Printer not ready, etc.). Pretty standard stuff. The only problem is that when I invoke ON ERROR DO FORM I get an error that does not occur with just ON ERROR. This happens when I try to use a table that does not have an attached CDX. I get an error 'Structural CDX Not Found'. This error DOES NOT occur if I just have ON ERROR as the default. Am I missing something here?
>>>>
>>>>I understand that the error event is another option but I have multiple forms and I don't really want to add a custom event handler to my base class unless that is my only option.
>>>>
>>>>AHWBGA!
>>>>TIA!
>>>>
>>>>Kevin
Kevin Scott
kehvn@carolina.rr.com


Hey! It's not my fault. It's some General named Protection!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform