Discussion:
Appending from a Cursor
Gene Wirchenko
2018-04-11 18:03:01 UTC
Permalink
Hello:

I have some code where I am importing transactions. I have a
cursor for these transactions where I validate them. After doing
this, I want to add them to the transaction table. I select the
transaction alias and then do
append from (alimport)

alimport is an alias variable. It works for creating the cursor:
SQLSEL * from cwkt;
where .f.;
into cursor (alimport) readwrite nofilter
It works to select the cursor:
select (alimport)

So why does the append not work? I get error 1 with the text
"File 'c:\cbs2dev\cutlblas_import.dbf' does not exist."

I figured out how to do this using SQL, but I would still like
to know why the append does not work.

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mtlp000085
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Thierry Nivelet
2018-04-11 18:06:35 UTC
Permalink
append from (dbf(alimport))

Append from expects a file

Thierry Nivelet
http://foxincloud.com/
Give your VFP app a second life in the cloud
Post by Gene Wirchenko
append from (alimport)
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/C6C715CB-8A81-4F0A-BF6F-***@foxincloud.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to
John Weller
2018-04-11 18:10:17 UTC
Permalink
You could try

APPEND FROM DBF(alimport)

John

John Weller
01380 723235
07976 393631
Post by Gene Wirchenko
I have some code where I am importing transactions. I have a
cursor for these transactions where I validate them. After doing
this, I want to add them to the transaction table. I select the
transaction alias and then do
append from (alimport)
SQLSEL * from cwkt;
where .f.;
into cursor (alimport) readwrite nofilter
select (alimport)
So why does the append not work? I get error 1 with the text
"File 'c:\cbs2dev\cutlblas_import.dbf' does not exist."
I figured out how to do this using SQL, but I would still like
to know why the append does not work.
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/001401d3d1c0$594ed160$0bec7420$@johnweller.co.uk
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Gene Wirchenko
2018-04-12 00:31:59 UTC
Permalink
Post by John Weller
You could try
APPEND FROM DBF(alimport)
[whack object="hand" target="forehead"] I have used it in the
past, just not very often. When I checked my code, I searched for
"append from (" instead of just "append from". Sometimes, 90% of the
battle is knowing what to look for.

I ended up using
<vfp>
insert into (this.thiscode+"_cwkt") select * from (alimport)
</vfp>

I am puzzled why (alimport) works for the SQL but not the
append from, but whatever.

[snip]

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mtlp000084
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Richard Kaye
2018-04-12 02:16:36 UTC
Permalink
APPEND FROM is xBase. As others mentioned, it wants the physical file and a cursor is a temp file buried in your temp directory using sys(2015) to create the file name. The SQL SELECT doesn't care about the location of the physical file since you already have it open.

--

rk

-----Original Message-----
From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Gene Wirchenko
Sent: Wednesday, April 11, 2018 8:32 PM
To: ***@leafe.com
Subject: RE: Appending from a Cursor
Post by John Weller
You could try
APPEND FROM DBF(alimport)
[whack object="hand" target="forehead"] I have used it in the
past, just not very often. When I checked my code, I searched for
"append from (" instead of just "append from". Sometimes, 90% of the
battle is knowing what to look for.

I ended up using
<vfp>
insert into (this.thiscode+"_cwkt") select * from (alimport)
</vfp>

I am puzzled why (alimport) works for the SQL but not the
append from, but whatever.

[snip]

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@DM5PR10MB1244.namprd10.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Fernando D. Bozzo
2018-04-12 05:22:35 UTC
Permalink
... and one more thing to add to what Richard said about APPEND FROM:

When APPEND FROM was created, in dBase/CPM times (1979), SQL syntax did not
exist, so did not get implemented in any language, at least until 1986, far
later than dBase.
Post by Richard Kaye
APPEND FROM is xBase. As others mentioned, it wants the physical file and
a cursor is a temp file buried in your temp directory using sys(2015) to
create the file name. The SQL SELECT doesn't care about the location of the
physical file since you already have it open.
--
rk
-----Original Message-----
Sent: Wednesday, April 11, 2018 8:32 PM
Subject: RE: Appending from a Cursor
Post by John Weller
You could try
APPEND FROM DBF(alimport)
[whack object="hand" target="forehead"] I have used it in the
past, just not very often. When I checked my code, I searched for
"append from (" instead of just "append from". Sometimes, 90% of the
battle is knowing what to look for.
I ended up using
<vfp>
insert into (this.thiscode+"_cwkt") select * from (alimport)
</vfp>
I am puzzled why (alimport) works for the SQL but not the
append from, but whatever.
[snip]
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAGQ_Jukg5Lx4n6bp_t8GqLywFrVu7J3xgiP_JvDq7G-***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are t
Ted Roche
2018-04-12 11:17:48 UTC
Permalink
I am puzzled why (alimport) works for the SQL but not the append from,
but whatever.
I agree with you that it is un-intuitive that aliases work *almost*
everywhere. It's one of those hundreds of FoxPro's "always been that
way" things.

As others have said, APPEND FROM is ancient nearly-original XBase.
While it was updated occasionally for new file formats, the main
purpose of the command is a low-level IMPORT (sibling command) from
foreign formats and not as a cursor-manipulation command, so it's
intended for reading files-on-disk and not cursors.
--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CACW6n4vrZjBs2a=gKbq1X3JAmgt+q--9oX-***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Paul H. Tarver
2018-04-12 13:18:50 UTC
Permalink
Ok, so let me ask the $64,000 question: Which method is faster or better:
Append From DBF( or Insert Into as Gene used?

I have a similar project were I am issuing the same query to multiple SQL
databases/servers and then using the Append From DBF( command to aggregate
the results from each individual query into a large, single cursor to use
for actual processing.

I'm traveling today or I'd test this myself, but I have limited access.
Figured I'd see if anyone else had already determined the best choice before
I go poking around on my own.

Paul

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Ted
Roche
Sent: Thursday, April 12, 2018 6:18 AM
To: ***@leafe.com
Subject: Re: Appending from a Cursor
I am puzzled why (alimport) works for the SQL but not the append from,
but whatever.
I agree with you that it is un-intuitive that aliases work *almost*
everywhere. It's one of those hundreds of FoxPro's "always been that
way" things.

As others have said, APPEND FROM is ancient nearly-original XBase.
While it was updated occasionally for new file formats, the main
purpose of the command is a low-level IMPORT (sibling command) from
foreign formats and not as a cursor-manipulation command, so it's
intended for reading files-on-disk and not cursors.
--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com

[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/08e401d3d260$f7849130$e68db390$@tpcqpc.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Alan Bourke
2018-04-12 13:29:39 UTC
Permalink
Post by Paul H. Tarver
Append From DBF( or Insert Into as Gene used?
I remember seeing on fox.wikis.com that Insert-SQL can be up to 100x faster than Append from. Not sure how true that is.
--
Alan Bourke
alanpbourke (at) fastmail (dot) fm

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@webmail.messagingengine.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Richard Kaye
2018-04-12 15:58:23 UTC
Permalink
As Ted would say, it depends on your environment. I doubt you will see any significant performance difference with a 100 row table. Big tables? Rotational vs SSD?

--

rk

-----Original Message-----
From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Alan Bourke
Sent: Thursday, April 12, 2018 9:30 AM
To: ***@leafe.com
Subject: Re: Appending from a Cursor
Post by Paul H. Tarver
Append From DBF( or Insert Into as Gene used?
I remember seeing on fox.wikis.com that Insert-SQL can be up to 100x faster than Append from. Not sure how true that is.
--
Alan Bourke
alanpbourke (at) fastmail (dot) fm


_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@DM5PR10MB1244.namprd10.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Dave Crozier
2018-04-12 16:49:04 UTC
Permalink
Paul,
I have been interested in testing this out myself, so in the interests of all I just ran a test inserting a 2,000,000 record table into another table with an integer PK index and a 20 character index (ID field) and the SQL Insert runs 75% quicker but only 25% quicker if the "select(" (suggested by Alan) for the inserted records is either a physical table or a readwrite cursor.

I suppose this confirms that using cursors to pre-fetch your data into memory is significantly faster for insertions as the required records are either in memory completely or filtered by VFP. As we all know making a cursor readwrite effectively makes a cursor perform the same as a physical table as it causes VFP to create a physical "table" which would appear to significantly degrade performance - understandable.

Hope this makes sense... have to go, made myself late for dinner, so if not I'll explain better tomorrow!!

Dave Crozier
Software Development Manager
Flexipol Packaging Ltd.



---------------------------------------------------------------
This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.

Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the risk of virus transmission through email and therefore any files sent via e-mail will have been checked for known viruses. However, you are advised to run your own virus check before opening any
attachments received as Flexipol Packaging Ltd will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received.

It is the responsibility of the recipient to ensure that they have adequate virus protection.

Flexipol Packaging Ltd.
Unit 14 Bentwood Road
Carrs
Industrial Estate
Haslingden
Rossendale
Lancashire
BB4 5HH

Tel:01706-222792
Fax: 01706-224683
www.Flexipol.co.uk
---------------------------------------------------------------

Terms & Conditions:

Notwithstanding delivery and the passing of risk in the goods, the property in the goods shall not pass to the buyer until the seller
Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds payment in full of the price of the goods and all other goods agreed to be sold by the seller to the buyer for which payment is then due. Until such time as the property in the goods passes to the buyer, the buyer shall hold the goods as the seller's fiduciary agent and bailee and keep the goods separate from those of the buyer and third parties and properly stored protected and insured and identified as the seller's property but shall be entitled to resell or use the goods in the ordinary course of its business. Until such time as the property in the goods passes to the buyer the seller shall be entitled at any time

-----Original Message-----
From: ProFox <profox-***@leafe.com> On Behalf Of Paul H. Tarver
Sent: 12 April 2018 14:19
To: ***@leafe.com
Subject: RE: Appending from a Cursor

Ok, so let me ask the $64,000 question: Which method is faster or better:
Append From DBF( or Insert Into as Gene used?

I have a similar project were I am issuing the same query to multiple SQL databases/servers and then using the Append From DBF( command to aggregate the results from each individual query into a large, single cursor to use for actual processing.

I'm traveling today or I'd test this myself, but I have limited access.
Figured I'd see if anyone else had already determined the best choice before I go poking around on my own.

Paul

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Ted Roche
Sent: Thursday, April 12, 2018 6:18 AM
To: ***@leafe.com
Subject: Re: Appending from a Cursor
I am puzzled why (alimport) works for the SQL but not the append from,
but whatever.
I agree with you that it is un-intuitive that aliases work *almost* everywhere. It's one of those hundreds of FoxPro's "always been that way" things.

As others have said, APPEND FROM is ancient nearly-original XBase.
While it was updated occasionally for new file formats, the main purpose of the command is a low-level IMPORT (sibling command) from foreign formats and not as a cursor-manipulation command, so it's intended for reading files-on-disk and not cursors.


--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com

[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/08e401d3d260$f7849130$e68db390$@tpcqpc.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@EX2010-A-FPL.FPL.LOCAL
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Paul H. Tarver
2018-04-12 22:05:19 UTC
Permalink
I was planning a similar test to get some sense of the quantifiable difference but you did a great job, Dave! The verdict is in and ‘Insert into’ wins hands down!

That’s what happens when you dangle Foxpro problems in this group. It’s like bait we can’t resist!

Thanks!
Paul

Sent from my iPhone
Post by Dave Crozier
Paul,
I have been interested in testing this out myself, so in the interests of all I just ran a test inserting a 2,000,000 record table into another table with an integer PK index and a 20 character index (ID field) and the SQL Insert runs 75% quicker but only 25% quicker if the "select(" (suggested by Alan) for the inserted records is either a physical table or a readwrite cursor.
I suppose this confirms that using cursors to pre-fetch your data into memory is significantly faster for insertions as the required records are either in memory completely or filtered by VFP. As we all know making a cursor readwrite effectively makes a cursor perform the same as a physical table as it causes VFP to create a physical "table" which would appear to significantly degrade performance - understandable.
Hope this makes sense... have to go, made myself late for dinner, so if not I'll explain better tomorrow!!
Dave Crozier
Software Development Manager
Flexipol Packaging Ltd.
---------------------------------------------------------------
This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.
Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the risk of virus transmission through email and therefore any files sent via e-mail will have been checked for known viruses. However, you are advised to run your own virus check before opening any
attachments received as Flexipol Packaging Ltd will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received.
It is the responsibility of the recipient to ensure that they have adequate virus protection.
Flexipol Packaging Ltd.
Unit 14 Bentwood Road
Carrs
Industrial Estate
Haslingden
Rossendale
Lancashire
BB4 5HH
Tel:01706-222792
Fax: 01706-224683
www.Flexipol.co.uk
---------------------------------------------------------------
Notwithstanding delivery and the passing of risk in the goods, the property in the goods shall not pass to the buyer until the seller
Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds payment in full of the price of the goods and all other goods agreed to be sold by the seller to the buyer for which payment is then due. Until such time as the property in the goods passes to the buyer, the buyer shall hold the goods as the seller's fiduciary agent and bailee and keep the goods separate from those of the buyer and third parties and properly stored protected and insured and identified as the seller's property but shall be entitled to resell or use the goods in the ordinary course of its business. Until such time as the property in the goods passes to the buyer the seller shall be entitled at any time
-----Original Message-----
Sent: 12 April 2018 14:19
Subject: RE: Appending from a Cursor
Append From DBF( or Insert Into as Gene used?
I have a similar project were I am issuing the same query to multiple SQL databases/servers and then using the Append From DBF( command to aggregate the results from each individual query into a large, single cursor to use for actual processing.
I'm traveling today or I'd test this myself, but I have limited access.
Figured I'd see if anyone else had already determined the best choice before I go poking around on my own.
Paul
-----Original Message-----
Sent: Thursday, April 12, 2018 6:18 AM
Subject: Re: Appending from a Cursor
I am puzzled why (alimport) works for the SQL but not the append
from,
but whatever.
I agree with you that it is un-intuitive that aliases work *almost* everywhere. It's one of those hundreds of FoxPro's "always been that way" things.
As others have said, APPEND FROM is ancient nearly-original XBase.
While it was updated occasionally for new file formats, the main purpose of the command is a low-level IMPORT (sibling command) from foreign formats and not as a cursor-manipulation command, so it's intended for reading files-on-disk and not cursors.
--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/C4493D5E-B8C7-42BC-87C2-***@tpcqpc.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawy
Jean MAURICE
2018-04-12 12:31:41 UTC
Permalink
Hi Gene,

'append from' appends data from a file on the disk and a cursor is not a file !

Can you try this :
APPEND FROM (DBF(m.alimport))

The Foxil

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/8115740b-ec64-cb50-8810-***@wanadoo.fr
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Alan Bourke
2018-04-12 13:21:04 UTC
Permalink
Post by Jean MAURICE
Hi Gene,
'append from' appends data from a file on the disk and a cursor is not a file !
A cursor may or may not have a disk presence depending on various factors.

But SQL is a a better way to do it.

insert into mytable (f1, f2, f3) select (f1, f2, f3) from mycursor
--
Alan Bourke
alanpbourke (at) fastmail (dot) fm

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@webmail.messagingengine.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Gene Wirchenko
2018-04-12 22:06:21 UTC
Permalink
Post by Jean MAURICE
Post by Jean MAURICE
Hi Gene,
'append from' appends data from a file on the disk and a cursor
is not a file !
A cursor may or may not have a disk presence depending on various factors.
But SQL is a a better way to do it.
insert into mytable (f1, f2, f3) select (f1, f2, f3) from mycursor
That was the way I ended up doing it.

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mtlp000085
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Rafael Copquin
2018-04-12 13:19:20 UTC
Permalink
Append from dbf('yourcursor')

Rafael Copquin
Post by Gene Wirchenko
I have some code where I am importing transactions. I have a
cursor for these transactions where I validate them. After doing
this, I want to add them to the transaction table. I select the
transaction alias and then do
append from (alimport)
SQLSEL * from cwkt;
where .f.;
into cursor (alimport) readwrite nofilter
select (alimport)
So why does the append not work? I get error 1 with the text
"File 'c:\cbs2dev\cutlblas_import.dbf' does not exist."
I figured out how to do this using SQL, but I would still like
to know why the append does not work.
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAHM-jJ3AKDTH5ni-***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid
Continue reading on narkive:
Loading...