Re: Requery('viewname')

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
> > >
> > >
> > >
>
>
>
.



Relevant Pages

  • Re: Requery(viewname)
    ... Sorry about the omission. ... Before you create your connection, ... > I am puzzled by why VFP did not identified return value -1 for REQUERY() ... >>> is master records with three child tables so if I change the record ...
    (microsoft.public.fox.programmer.exchange)
  • Re: OWA, Remote Web Workspace problem
    ... published site. ... article form ISAServer.org in the "Verify External Connectivity" section ... Other requests will be answered with the error message: Error Code: 403 ... A successful connection attempt will probably provide with the following ...
    (microsoft.public.isaserver)
  • Re: Winsock provider catalog
    ... PING: transmit failed, error code 65. ... info Using home Internet connection ... info Network connection: Name=Local Area Connection 3, ...
    (microsoft.public.windowsxp.general)
  • Re: Winsock provider catalog
    ... PING: transmit failed, error code 65. ... info Using home Internet connection ... info Network connection: Name=Local Area Connection 3, ...
    (microsoft.public.windowsxp.general)
  • Re: activesync code 0x85020006
    ... The error code you mention below maps to a connection error - ... Internet Explorer? ... installing ActiveSync 4.2, ...
    (microsoft.public.pocketpc.activesync)