|
Home > Archive > dBASE Questions and Answers > December 2005 > writing custom view to dbf
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
writing custom view to dbf
|
|
| George 2005-12-14, 11:24 am |
|
Hi,
Is there an alternate way other than the export wizard, say using programming at the dot prompt to write to a new dbf table, records selected from custom view using dQuery after linking two tables.
Thanks
George
Hello:
I managed to use the dQuery wizard from dBase Plus v 2.21 to connect to an Access database table. Once thats done, I can then manipulate the data using dot commands, even in a program!
However, I did not find the same wizard prompts for Excel spread sheets.
I tried using the BDE administrator, was unsuccessful.
In both the BDE administration and dQuery, on click it, the login username, password window appears and can go no further.
there must be a way to manipulate excel spreadsheet data from dbase without doing an import/export, CSV file..etc.
any help appreciated.
George
| |
| Ken Mayer [dBVIPS] 2005-12-14, 8:25 pm |
| George wrote:
> Hi,
> Is there an alternate way other than the export wizard, say using programming at the dot prompt to write to a new dbf table, records selected from custom view using dQuery after linking two tables.
>
Not likely. Custom views created for dQuery are saved in a format that
dQuery understands, and are designed for use in dQuery ... you would
have to write code that read the datamodule and worked with that to use
the custom views ...
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
| |
| Todd Kreuter 2005-12-14, 8:25 pm |
| George wrote:
>
> Is there an alternate way other than the export wizard, say using programming at the dot prompt to write to a new dbf table, records selected from custom view using dQuery after linking two tables.
Why not use the export wizard?
You could write a program to do that, which would take a bit of work:
Use the dQuery viewgrid columns to build the create table command from
each datalink, then create the table.
Traverse the viewgrid.datalink and write each row where your created
table's rowset.fields[i].value = viewgrid.columns[i].datalink.value.
You can get an instance of the viewGrid by doing the following (and of
course you can put this into a prg):
Run dQuery with a datamodule
Go to the command prompt
o = findInstance("QSubForm")
inspect(o.viewgrid)
--
Todd Kreuter [dBVIPS]
| |
| George 2005-12-14, 8:25 pm |
|
Thank you gentlemen for your assistance.
I would like to use the export wizard, but I encountered problem and it would not work for me!
I use dBase Plus v2.21
After created a custom view linking two local tables In dQuery from SQL file, I am able to use the export wizard to export customer view to excel spread sheet.
However, using the same wizard, same procedure but selecting " new database table", instead of Excel spreadsheet produced error popup.
>
> results in an error :
> No catch for exception, class:exception
> file qWizExport.who
> Routine: QQIZEXPORTFORM:EXPOR
TTABLE
> Line 1818
>
I also tried simply exporting a simple three record table dragged into dQuery from navigator and it would not work either. Where can I check if I have all the files to do this, and how can I trouble shoot?
George
Ken Mayer [dBVIPS] Wrote:
> George wrote:
>
> Not likely. Custom views created for dQuery are saved in a format that
> dQuery understands, and are designed for use in dQuery ... you would
> have to write code that read the datamodule and worked with that to use
> the custom views ...
>
> Ken
>
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/dbase/dBASEBook.htm
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase
| |
| George 2005-12-14, 8:25 pm |
| Further comment to the problem I am encountering, I am able to write the custom view data to a new table using the export wizard by selecting "custom view" "Add to Existing database Table" then selecting the database and table, and field mapping and final
ly "Finish"
with successful write.
This of course requires me to have an empty table with the appropriate structure ready for the export ahead of time.
For some reason, export wizard, selecting "New Database table" dosent want to work.
Any idea appreicated.
George
|
|
|
|
|