Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is there any way to export a database with the memo field?

Status
Not open for further replies.

ewqdascxz

IS-IT--Management
Aug 4, 2011
23
PH
exporting from foxpro to emagicdeveloper
 
In your previous thread about exporting to SDF I already said:

"I took a look at what your development platform Magic eDeveloper offers and I see among databases supported there is a general support for any database with ODBC driver, and there is a Foxpro ODBC driver. The latest version of it supports all field types up to VFP6, that may not stop you from using this instead of migrating to SDF (or any other database)."

Depending on your DBFs version you can connect to dbfs and import data from Magic eDeveloper instead of exporting from vfp. And if your dbfs are not accessible via odbc you can convert the DBFs with VFP9 to eg free DBFs in 2.6 format and/or just stripe off the field types not supported as varchar, varbinary, autoinc integers, if you have such fields at all.

All you need is the VFP ODBC driver:

Bye, Olaf.

Bye, Olaf.
 
Besides that,

SDF is a simply ASCCI format not ideal for sql quereis (no indexes, no performance optimisation) and having no delimiter between fields, but a constant width for each column. Therefore it does not support variable length fields like MEMO is.

If ODBC fails for you, eg eDeveloper Xpress edition does not offer that interface, choose some other exchange format towards eDEveloper or another destination database and export into that from VFP.

Bye, Olaf.
 
Is there any assurance that the memo field will be included in the export? because it is the only field that we can't export and will it export every fields through your process?
 
You can import via ODBC, and the ODBC driver can access memo fields, yes. Memos existed since way back FP Dos and are supported in ODBC.

Bye, Olaf.
 
Is there any tutorial on how to use ODBC? especially for using it in importing to magic edeveloper
 
I mean can you give me any tips on how to use the ODBC driver for importing to magic edeveloper?
 
exporting from foxpro to emagicdeveloper

I don't see it mentioned here.
Perhaps you mentioned it in another post.

But is this a One-time export from FP/VFP or is this something that needs to occur periodically?

If this is a one-time event, then just Export the FP/VFP data into a file type that your eDeveloper can use.

If this needs to be a periodically occurring event, then ODBC is the route to go.

Is there any tutorial on how to use ODBC? especially for using it in importing to magic edeveloper

If you already know the following I apologize, but in an extremely general way...

1. Establish an ODBC Connection to the 'other' database
2. Use that Connection to acquire data from a data table within the 'other' database. Generally using something like SQLEXEC()
Note - Having never even heard of "Magic eDeveloper", I cannot begin to offer any specific commands.
3. Use the data acquired from the data table(s) in the 'other' database.
4. Close ODBC Connection

* OR *

Doing a Google search for: ODBC tutorial will show you a number of general tutorial references.

We can certainly offer you assistance on FP/VFP code utilization and on ODBC Connection strings to use to get into a VFP Database (see: but your question might be best answered by someone familiar with the eDeveloper 'language' capabilities and usage.

Good Luck,
JRB-Bldr
 
>If this is a one-time event, then just Export the FP/VFP data into a file type that your eDeveloper can use.

Good idea jrbbldr, but we've already been there, done that. Using SDF files was having the problem of not exporting MEMO, which is the remaining unresolved problem. CSV and any other Text format is not appropriate for Memos, but if there is an easy solution to connect to ODBC to DBFs from eDeveloper, Ewqdascxz could even stay with the data in DBFs and use them from eDeveloper.

Ewqdascxz, I can't help you with how to connect from eDeveloper, if you find an eDeveloper or ask the vendor of that product, they should be able to help you. I also hope eDeveloper comes with a help and reference manual, but I'm an expert on VFP mainly, SQL Server, Office, PHP, MySQL HTML, XML, OLE/COM. Many things, but not eDeveloper.

Two general ways to make use of an ODBC driver is to use the Windows ODBC Manager and create a DSN (Data Source Name) with it, a software capable to connect via ODBBC can then use, or use a so called DSNless ODBC connection string.

Bye, Olaf.
 
Olaf - I stand corrected.
Yes a COPY TO MyCSVFile DELIMITED will not export the Memo fields.

But, while it is somewhat 'kludgy' if they have the FP/VFP IDE then they could do:
Code:
  SELECT *,;
    LEFT(MemoFld,200) as First200,;
    SUBSTR(MemoFld,201,200) as Secnd200,;
    SUBSTR(MemoFld,401,200) as Third200,;
    SUBSTR(MemoFld,601,200) as Forth200,;
     and so on....,
    FROM VFPTable;
    INTO CURSOR NewResults

SELECT NewResults
COPY TO MyCSVFile DELIMITED

And then do whatever they needed to do with the one-time exported data and eventually concatenating the Memo field data back together on the recipient side.

Ewqdascxz - Good Luck,
JRB-Bldr

 
thank you for the replies.. but what does these codes do??

SELECT *,;
LEFT(MemoFld,200) as First200,;
SUBSTR(MemoFld,201,200) as Secnd200,;
SUBSTR(MemoFld,401,200) as Third200,;
SUBSTR(MemoFld,601,200) as Forth200,;
and so on....,
FROM VFPTable;
INTO CURSOR NewResults

SELECT NewResults
COPY TO MyCSVFile DELIMITED

 
This SQL cuts a long memo field, which for example can contain a text with 2000 characters into chiunks of simple text fields each 200 chars long, so the resulting cursor has no memo field, but a series of text fields you can export via SDF, import and then join them on the eDeveloper side.

Buit if you get ODBC connections going from eDeveloper you can import memos in one piece without going that detour.

Bye, Olaf.
 
What specific files I can select using those codes?

I still don't know how to use the ODBC connections. Can you give me a step by step on how to use it for foxpro?




Thanks, ewqdas.
 
See my reply 23 Aug 11 7:40 Links on my source of information about ODBC and how to use it from eDeveloper.

Bye, Olaf.
 
Can you give me a step by step on how to use it for foxpro?

Are you wanting to run code in a eDeveloper application to Import code from a FP/VFP data table?

If this, then you should be looking for an eDeveloper developer to help/advise you with the language-specific code.

OR

Are you wanting to run code in a Visual Foxpro application to Export code periodically into eDeveloper?

If this, then you have to locate a ODBC driver which will allow your VFP application to connect to your eDeveloper database tables.

Have you done so already?

If not, then there is no point in going further until you do so.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top