Re: Requery('viewname')
- From: "Eric Lim" <EricLim@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Apr 2005 18:24:02 -0700
Hi All,
Thank you Dan for identifying the omission. Mark's idea of capturing the
error code have some result. This is what I got and as expected 'Connection
is busy'
Clipboard text:-
1526
Connectivity error: [Microsoft][ODBC SQL Server Driver]Connection is busy
with results for another hstmt
[Microsoft][ODBC SQL Server Driver]Connection is busy with results for
another hstmt
S1000
0
6
I am puzzled by why VFP did not identified return value -1 for REQUERY() to
developer so at least we understand how to handle it in our coding. Most
likely VFP team did not expect return value -1, otherwise it should
documented in the user guide. The solution I suppose is not to use shared
connection but then you will need to create a new connection to SQL server.
There is one unclear issue here is when you create a new connection, do we
use SQLCOMMIT() twice since there are two connections in the same private
datasession or just one SQLCOMMIT is fine? As you are aware SQLCOMMIT() is
via statement handle since VFP8.
"Mark McCasland" wrote:
> Modify your code to the following:
>
> lnReturn = REQUERY('view_name')
> if lnReturn < 0 and version (2) = 2 && dev environment
> local laError[1], lcError, lnI
> aerror(laError)
> lcError = []
> for lnI = 1 to alen(laError)
> lcError = transform(laError[lnI]) + CHR(13) + CHR(10)
> endfor
> messagebox(lcError)
> _cliptext = lcError
> endif
>
> Since the error info will now be on the clipboard, come back here and post
> the error info so we can try to see what is happening.
>
> "Eric Lim" <EricLim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:D9EFB721-8BD9-4E9A-8F3A-0D8CB01F1BE5@xxxxxxxxxxxxxxxx
> > Hi,
> >
> > Let me update you further on this. With regards to Modal form, it does
> > happens but only when you do a REQUERY() in a very fast way. What I have
> here
> > is master records with three child tables so if I change the record
> position
> > in the master table the child records with be REQUERY() accordingly.
> >
> > Thus if I change the master record in a split second the REQUERY() will
> > return -1 too although not as obvious as Modeless form.
> >
> >
> > "Mark McCasland" wrote:
> >
> > > Does the SELECT command used to create the view have any functions like
> > > TRIM() for any of the fields being selected? If so, the problem could be
> a
> > > "base table structure change" type of error. Does AERROR() return any
> more
> > > information?
> > >
> > > "Eric Lim" <EricLim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > > news:97595292-0285-497B-8EBA-8CE09F1A5628@xxxxxxxxxxxxxxxx
> > > > Hi All,
> > > >
> > > > Any idea what is the problem if the Requery() returns -1 instead of 0
> or
> > > 1?
> > > > There is no documentation to explain what was the problem if Requery()
> > > return
> > > > -1
> > > >
> > > > --
> > > > Eric Lim
> > >
> > >
> > >
>
>
>
.
- Follow-Ups:
- Re: Requery('viewname')
- From: Mark McCasland
- Re: Requery('viewname')
- References:
- Requery('viewname')
- From: Eric Lim
- Re: Requery('viewname')
- From: Mark McCasland
- Re: Requery('viewname')
- From: Eric Lim
- Re: Requery('viewname')
- From: Mark McCasland
- Requery('viewname')
- Prev by Date: Class name is invalid - but why?
- Next by Date: Re: Requery('viewname')
- Previous by thread: Re: Requery('viewname')
- Next by thread: Re: Requery('viewname')
- Index(es):
Relevant Pages
|