Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

VFP commands seek, replace, delete...

5 posts in FoxPro Last posting was on 2010-03-10 11:55:19.0Z
Desimir Posted on 2010-03-05 12:43:54.0Z
Reply-To: "Desimir" <desimir@infosys.rs>
From: "Desimir" <desimir@infosys.rs>
Newsgroups: advantage.foxpro
Subject: VFP commands seek, replace, delete...
Date: Fri, 5 Mar 2010 13:43:54 +0100
Lines: 4
Organization: Infosys
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 89.216.26.134
Message-ID: <4b90fc0b@solutions.advantagedatabase.com>
X-Trace: 5 Mar 2010 05:41:47 -0700, 89.216.26.134
Path: solutions.advantagedatabase.com!89.216.26.134
Xref: solutions.advantagedatabase.com Advantage.FoxPro:342
Article PK: 1109696

Hi.How can I use VFP commands seek, replace, delete... for work with free
tables when RDMS is ADS? Any examples?


Mark Wilkins Posted on 2010-03-08 23:30:06.0Z
From: "Mark Wilkins" <mark@no.email>
Newsgroups: advantage.foxpro
References: <4b90fc0b@solutions.advantagedatabase.com>
Subject: Re: VFP commands seek, replace, delete...
Date: Mon, 8 Mar 2010 16:30:06 -0700
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 10.24.38.228
Message-ID: <4b9587fb@solutions.advantagedatabase.com>
X-Trace: 8 Mar 2010 16:27:55 -0700, 10.24.38.228
Path: solutions.advantagedatabase.com!10.24.38.228
Xref: solutions.advantagedatabase.com Advantage.FoxPro:343
Article PK: 1109697

It is not possible to use those commands directly against a table except
when using VFP natively. Those commands are processed by Visual FoxPro when
and only work on tables that it opens directly.

But you should be able to use those commands against a cursor (for example
created through ODBC) and then make sure to write the updates back (e.g.,
CURSORSETPROP( "SendUpdates" ...)

Do you have more details on your environment? Are you using ODBC or OLE DB?

Mark Wilkins
Advantage R&D

"Desimir" <desimir@infosys.rs> wrote in message
news:4b90fc0b@solutions.advantagedatabase.com...
> Hi.How can I use VFP commands seek, replace, delete... for work with free
> tables when RDMS is ADS? Any examples?
>


Desimir Posted on 2010-03-09 19:42:48.0Z
Reply-To: "Desimir" <desimir@infosys.rs>
From: "Desimir" <desimir@infosys.rs>
Newsgroups: advantage.foxpro
References: <4b90fc0b@solutions.advantagedatabase.com> <4b9587fb@solutions.advantagedatabase.com>
Subject: Re: VFP commands seek, replace, delete...
Date: Tue, 9 Mar 2010 20:42:48 +0100
Lines: 38
Organization: Infosys
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 89.216.26.134
Message-ID: <4b96a438@solutions.advantagedatabase.com>
X-Trace: 9 Mar 2010 12:40:40 -0700, 89.216.26.134
Path: solutions.advantagedatabase.com!89.216.26.134
Xref: solutions.advantagedatabase.com Advantage.FoxPro:344
Article PK: 1109698

I am using OLE DB with CursorAdapter and
ADODB.Recordset.CursorType=adOpenDynamic AND ConnString:
[Provider=Advantage.OLEDB.1;Advantage Locking
Mode=ADS_COMPATIBLE_LOCKING;Advantage Table Type=ADS_CDX]

After method CursorFill() the indexes are created using VFP command Index on
(due to compatibility with old code).

Question:
How CursorAdapter gets information about which data is added in original
DataTable without using method CursorRefresh()? (too long executing)

"Mark Wilkins" <mark@no.email> wrote in message
news:4b9587fb@solutions.advantagedatabase.com...
> It is not possible to use those commands directly against a table except
> when using VFP natively. Those commands are processed by Visual FoxPro
> when and only work on tables that it opens directly.
>
> But you should be able to use those commands against a cursor (for example
> created through ODBC) and then make sure to write the updates back (e.g.,
> CURSORSETPROP( "SendUpdates" ...)
>
> Do you have more details on your environment? Are you using ODBC or OLE
> DB?
>
> Mark Wilkins
> Advantage R&D
>
>
> "Desimir" <desimir@infosys.rs> wrote in message
> news:4b90fc0b@solutions.advantagedatabase.com...
>> Hi.How can I use VFP commands seek, replace, delete... for work with free
>> tables when RDMS is ADS? Any examples?
>>
>
>


Mark Wilkins Posted on 2010-03-09 22:41:45.0Z
From: "Mark Wilkins" <mark@no.email>
Newsgroups: advantage.foxpro
References: <4b90fc0b@solutions.advantagedatabase.com> <4b9587fb@solutions.advantagedatabase.com> <4b96a438@solutions.advantagedatabase.com>
Subject: Re: VFP commands seek, replace, delete...
Date: Tue, 9 Mar 2010 15:41:45 -0700
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 10.24.38.228
Message-ID: <4b96ce26@solutions.advantagedatabase.com>
X-Trace: 9 Mar 2010 15:39:34 -0700, 10.24.38.228
Path: solutions.advantagedatabase.com!10.24.38.228
Xref: solutions.advantagedatabase.com Advantage.FoxPro:345
Article PK: 1109699

I am pretty sure it is necessary to either re-open the recordset or run the
CursorRefresh (which also runs the query again). There is not any mechanism
underneath the cursor adapter that detects changes to the underlying
database.

If you are having speed problems, make sure that you are using a server-side
cursor:
mycursoradapter.CursorLocation = 2 && adUseServer

If you are using a client-side cursor (value 3), it can be very slow because
it loads the entire recordset into memory all before doing anything. Also,
it might make sense to set:

mycursoradapter.FetchAsNeeded = .T.


Mark Wilkins
Advantage R&D

"Desimir" <desimir@infosys.rs> wrote in message
news:4b96a438@solutions.advantagedatabase.com...
>I am using OLE DB with CursorAdapter and
>ADODB.Recordset.CursorType=adOpenDynamic AND ConnString:
> [Provider=Advantage.OLEDB.1;Advantage Locking
> Mode=ADS_COMPATIBLE_LOCKING;Advantage Table Type=ADS_CDX]
>
> After method CursorFill() the indexes are created using VFP command Index
> on (due to compatibility with old code).
>
> Question:
> How CursorAdapter gets information about which data is added in original
> DataTable without using method CursorRefresh()? (too long executing)
>


Desimir Posted on 2010-03-10 11:55:19.0Z
Reply-To: "Desimir" <desimir@infosys.rs>
From: "Desimir" <desimir@infosys.rs>
Newsgroups: advantage.foxpro
References: <4b90fc0b@solutions.advantagedatabase.com> <4b9587fb@solutions.advantagedatabase.com> <4b96a438@solutions.advantagedatabase.com> <4b96ce26@solutions.advantagedatabase.com>
Subject: Re: VFP commands seek, replace, delete...
Date: Wed, 10 Mar 2010 12:55:19 +0100
Lines: 48
Organization: Infosys
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 89.216.26.134
Message-ID: <4b978826@solutions.advantagedatabase.com>
X-Trace: 10 Mar 2010 04:53:10 -0700, 89.216.26.134
Path: solutions.advantagedatabase.com!89.216.26.134
Xref: solutions.advantagedatabase.com Advantage.FoxPro:346
Article PK: 1109702

Yes, I set all of this properties. Due to compatibility with old code cursor
must be indexed (seek, found ...) and vfp command 'index on' neads to load
all data. I was expecting that it will work like opening table in Advatnage
data architect . The Architect recognise index in cdx and work fast. Also,
The Architect loads new data very fast and I was expecting that
communication between ADS i VFP can recognize indexes. Can VFP use benefits
ADS (something like ado.net)?

"Mark Wilkins" <mark@no.email> wrote in message
news:4b96ce26@solutions.advantagedatabase.com...
>I am pretty sure it is necessary to either re-open the recordset or run the
>CursorRefresh (which also runs the query again). There is not any
>mechanism underneath the cursor adapter that detects changes to the
>underlying database.
>
> If you are having speed problems, make sure that you are using a
> server-side cursor:
> mycursoradapter.CursorLocation = 2 && adUseServer
>
> If you are using a client-side cursor (value 3), it can be very slow
> because it loads the entire recordset into memory all before doing
> anything. Also, it might make sense to set:
>
> mycursoradapter.FetchAsNeeded = .T.
>
>
> Mark Wilkins
> Advantage R&D
>
> "Desimir" <desimir@infosys.rs> wrote in message
> news:4b96a438@solutions.advantagedatabase.com...
>>I am using OLE DB with CursorAdapter and
>>ADODB.Recordset.CursorType=adOpenDynamic AND ConnString:
>> [Provider=Advantage.OLEDB.1;Advantage Locking
>> Mode=ADS_COMPATIBLE_LOCKING;Advantage Table Type=ADS_CDX]
>>
>> After method CursorFill() the indexes are created using VFP command Index
>> on (due to compatibility with old code).
>>
>> Question:
>> How CursorAdapter gets information about which data is added in
>> original DataTable without using method CursorRefresh()? (too long
>> executing)
>>
>
>