Home > Archive > Programming with dBASE > May 2005 > Lookupsql problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Lookupsql problem
Rick

2005-05-02, 8:23 pm

I have encountered a sometime problem with lookupsql. When I attempt to access a field in the cansave of a rowset like this:

cTypeOld=this.fields[“TYPE”].lookuprowset.fields[1].value

I get an “…expecting object” error, but only sometimes. It appears that the lookupsql rowset is no longer defined for some reason. After running the same routine a couple times, the rowset returns and the error no longer appears.

I had something like this happen before and believe I solved it by directly accessing the field just before using the lookupsql like so:

cTypeOldFIX= this.fields[“TYPE”].value
cTypeOld=this.fields[“TYPE”].lookuprowset.fields[1].value

But looking at the code it appears I already did this in the line just before the lookupsql line causing the error. This confirms it is the lookuprowset object the error is referring to.

Has anyone also experienced a loss of the lookupsql rowset? Is there something else someone could recommend to prevent this problem?

Appreciate any and all ideas.

Thanks,
Rick

Todd Kreuter [dBVIPS]

2005-05-02, 8:23 pm

"Rick" <Sportman7@netzero.net> wrote in message
news:2KEMt83TFHA.1528@news-server...
>
> I get an ".expecting object" error, but only sometimes. It appears that

the lookupsql rowset is no longer defined for some reason. After running the
same routine a couple times, the rowset returns and the error no longer
appears.

Hi Rick,

At what point are you getting the errror? Sounds like the lookup is not set
prior to this code executing. How is the can save defined. If it looks
something like cansave = class::Rowset_canSav
e() [Note the parenthesis],
that would cause the canSave code to execute immediately. Been there, done
that.

Todd Kreuter [dBVIPS]


Rick

2005-05-03, 8:23 pm

Hi Todd,

> At what point are you getting the errror? Sounds like the lookup is not set
> prior to this code executing.


I don't think that is the problem. The cansave is placed in an overriden OnOpen for the rowset in a dmd so it should always be active for this form.

How is the can save defined. If it looks

> something like cansave = class::Rowset_canSav
e() [Note the parenthesis],
> that would cause the canSave code to execute immediately. Been there, done
> that.


Another tip to get from your experience that I will need to file for the future, tho this cansave is not called with parens.

Can't figure why it does not occur all the time. Since the cansave is establisehd in the dmd, it should always be active unless I remove it somewhere and I know that is not the case. Even if it were, if it was removed it should be a continuous problem a
nd not just disappear and reappear for no obvious reason. Thought maybe there is some other way a lookupsql could "lose it's way" and be disconnected.

Maybe will check the indexes again to be sure there is no corruption causing the problem.

I am using a datamodref, and I know I have had some strange behaviour that I was able to get rid of by switching to dmd instead. I've switched to dmds in many forms because of various issues that have come up around datamodrefs, but I find them very usef
ul in this case. To useful to go that route here.

Let me know if you think of anything else I should be looking for, and thanks again for your help,
Rick


Todd Kreuter [dBVIPS] Wrote:

> "Rick" <Sportman7@netzero.net> wrote in message
> news:2KEMt83TFHA.1528@news-server...
> the lookupsql rowset is no longer defined for some reason. After running the
> same routine a couple times, the rowset returns and the error no longer
> appears.
>
> Hi Rick,
>
> At what point are you getting the errror? Sounds like the lookup is not set
> prior to this code executing. How is the can save defined. If it looks
> something like cansave = class::Rowset_canSav
e() [Note the parenthesis],
> that would cause the canSave code to execute immediately. Been there, done
> that.
>
> Todd Kreuter [dBVIPS]
>
>


Todd Kreuter [dBVIPS]

2005-05-04, 3:23 am

"Rick" <Sportman7@netzero.net> wrote in message
news:pNXIj0BUFHA.1768@news-server...
>
> Let me know if you think of anything else I should be looking for, and

thanks again for your help,

Are you restating the sql, causing the query to close and reopen? That would
cause you to lose your rowset and field settings.

Todd Kreuter [dBVIPS]


Rick

2005-05-05, 3:23 am

Todd,

No, nothing like that. What is puzzling is how intermittent it is. It does not seem to be happening frequently, which makes it particularly hard to track down. Guess it is one of those things I'll have to keep monitoring and thinking about and hope the
client doesn't get it too often before a light bulb turns on.

Do you know if you can get a network time out of sorts that might cause the lookup rowset to lose it's connection without a specific network error message...or am I just grasping at straws? Scratch that...when I think about it if that were happening I'd
probably be having lots of other problems with other lookups as well.

Thanks for the extra effort,
Rick



Todd Kreuter [dBVIPS] Wrote:

> "Rick" <Sportman7@netzero.net> wrote in message
> news:pNXIj0BUFHA.1768@news-server...
> thanks again for your help,
>
> Are you restating the sql, causing the query to close and reopen? That would
> cause you to lose your rowset and field settings.
>
> Todd Kreuter [dBVIPS]
>
>


Todd Kreuter [dBVIPS]

2005-05-10, 8:23 pm

"Rick" <Sportman7@netzero.net> wrote in message
news:ssUygOTUFHA.432@news-server...
>
> No, nothing like that. What is puzzling is how intermittent it is. It

does not seem to be happening frequently, which makes it particularly hard
to track down. Guess it is one of those things I'll have to keep monitoring
and thinking about and hope the client doesn't get it too often before a
light bulb turns on.

Off hand, I can't think of any thing else where the lookupRowset would
become unavailable. You mentined using shared dataModRef, perhaps somthing
related to that.

Todd Kreuter [dBVIPS]


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com