Subject Re: ExportData.wfm problem
From Mervyn Bick <invalid@invalid.invalid>
Date Sat, 12 Jul 2014 11:58:01 +0200
Newsgroups dbase.getting-started

On Tue, 08 Jul 2014 20:50:09 +0200, Pieter van Heerden <psvh@mweb.co.za>  
wrote:

> This is dBase 2.8 on Windows 8.
>
> I have a problem with the exportdata form in that it does everything  
> expected, up to the point where selected fields have to be "filled" with  
> data.  Column headings show, but the contents remain empty.
>
> Removing a column from the list is successful, trying to add a column  
> that shows is unsuccessful, with an error message to that effect.  This  
> is behavior as it should be.
>
> The query from which export is done is:
>       d = new database("SAPWAT")
>       d.active = true
>       q = new query()
>       q.database = d
>       q.sql = "@exportwuasub.sql"
>       q.active = true
>       do ExportData.wfm with q
>
> The number of columns to be exported is 72 and the number of rows about  
> 700.  I have reduced columns to 20, made no difference so there does not  
> seem to be an overload of data.
>
> The end result is that although the query is successful, no export can  
> take place.
>
> Is there an alternative that I could build into my application, or does  
> someone have an answer to my problem.

I take it you've already checked that your .sql file produces the rowset  
you need.  (Double click in the .sql file in the Navigator to open the  
rowset in a browser for inspection.)

If your .sql file is producing a rowset then the problem lies with the  
interaction between dBASE 2.8 and Windows 8.  (You should be using Windows  
8.1 anyway as apparently Microsoft no longer supports Windows 8 with  
security updates.)  Exportdata.wfm works perfectly with joined tables in a  
.sql file under Windows XP Pro, SP3.

Problems opening the OLE Autoclient object also suggest the problem is  
with the interaction between dBASE 2.8 and Windows 8.  If this happens it  
would be better to export as a .csv file rather than as a .xls file.  But  
first, of course, you've got to get data into that rowset. <g>

If your .sql file is producing a rowset you may need to DIY to create a  
.csv file.  In this event it will probably be easier to select the  
required fields in the .sql file.  That way your code needn't check for  
required fields and will, therefore, be simpler and you can simply export  
the lot.

If your .sql file is producing a rowset you could also try creating a  
similar .sql file that only creates a rowset with a few fields and rows.    
If this works it points to exportdata.wfm not being able to handle large  
rowsets.   Once again, DIY beckons. <g>

Mervyn.