# Database export

**URL:** https://forums.suse.com/t/database-export/25889
**Category:** Chatting over the Back Fence
**Created:** [July 22, 2014, 10:53pm UTC](https://forums.suse.com/t/database-export/25889 "2014-07-22T22:53:46Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)
#### Post date: [July 22, 2014, 10:53pm UTC](https://forums.suse.com/t/database-export/25889/1 "2014-07-22T22:53:46Z")

</div>

Anyone have any experience exporting data from foxpro (maybe visual  
foxpro) to be able to be converted / imported into sql?

–  
Stevo

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 23, 2014, 5:52pm UTC](https://forums.suse.com/t/database-export/25889/2 "2014-07-23T17:52:53Z")

</div>

On 22/07/2014 20:53, Stevo wrote:[color=blue]

> Anyone have any experience exporting data from foxpro (maybe visual  
> foxpro) to be able to be converted / imported into sql?[/color]

odbc probably your friend there 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 23, 2014, 11:42pm UTC](https://forums.suse.com/t/database-export/25889/3 "2014-07-23T23:42:43Z")

</div>

Dave Howe sounds like they ‘said’:  
[color=blue]

> odbc probably your friend there :)[/color]

So my response to Dave’s comment is…

We don’t have visual foxpro installed anywhere. This is from a small  
software package developed by an outside source.

–  
Stevo

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 23, 2014, 11:51pm UTC](https://forums.suse.com/t/database-export/25889/4 "2014-07-23T23:51:21Z")

</div>

Stevo wrote:  
[color=blue]

> Dave Howe sounds like they ‘said’:  
> [color=green]
> 
> > odbc probably your friend there :)[/color]
> 
> So my response to Dave’s comment is…
> 
> We don’t have visual foxpro installed anywhere. This is from a small  
> software package developed by an outside source.[/color]

You should still be able to download the ODBC Visual Foxpro driver and  
point it to the database and then dump the data in to Excel. Then  
you’ll need to cleanse the data.

If you have data that format appropriately in to Excel (such as codes  
that have leading zeros), then you can use something like WinSQL to  
issue your queries against the ODBC datasource and then copy/paste it  
in to something else…

[http://msdn.microsoft.com/en-us/library/ms710251(v=vs.85).aspx](http://msdn.microsoft.com/en-us/library/ms710251%28v=vs.85%29.aspx)

Updates page which has link to the OLE driver and a reference to the  
ODBC driver  
[http://msdn.microsoft.com/en-US/vfoxpro/bb190232](http://msdn.microsoft.com/en-US/vfoxpro/bb190232)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 23, 2014, 11:55pm UTC](https://forums.suse.com/t/database-export/25889/5 "2014-07-23T23:55:26Z")

</div>

And further to that, if you do dump the tables in to Excel you can  
create formulae which will create the INSERT statements for each line.  
You’ll just need to set up the destination tables in which-ever  
database engine you are using first and make sure you honour data-types  
and constraints.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 24, 2014, 12:54am UTC](https://forums.suse.com/t/database-export/25889/6 "2014-07-24T00:54:53Z")

</div>

Scott Campbell sounds like they ‘said’:  
[color=blue]

> And further to that, if you do dump the tables in to Excel you can  
> create formulae which will create the INSERT statements for each line.  
> You’ll just need to set up the destination tables in which-ever  
> database engine you are using first and make sure you honour  
> data-types and constraints.[/color]

So my response to Scott’s comment is…

You sure are talking like I’ve done a bunch of db admin work before. 😉

Only db stuff I’ve ever done pretty much is with Groupwise and I don’t  
really have to do any dba stuff with that.

–  
Stevo

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 24, 2014, 3:53am UTC](https://forums.suse.com/t/database-export/25889/7 "2014-07-24T03:53:53Z")

</div>

Stevo wrote:  
[color=blue]

> So my response to Scott’s comment is…
> 
> You sure are talking like I’ve done a bunch of db admin work before.  
> 😉
> 
> Only db stuff I’ve ever done pretty much is with Groupwise and I don’t  
> really have to do any dba stuff with that.[/color]

I guess the question then becomes what are you comfortable with, with  
databases?

Have you ever set up a DSN in the ODBC Manager?

Do you understand the standard sql statements, select, insert, update,  
delete?

High level steps would be like this:

1). install the foxpro ODBC driver on your computer (ideally a 32bit  
machine to avoid confusion because the ODBC Manager is different for  
32bit and 64bit)  
2). Add a DSN and configure the foxpro ODBC driver (through Start →   
Control Panel → Administrative Tools → Data Sources (ODBC)) to point  
to a copy of your foxpro database.  
3). If you are using Excel go to Data → From Other Sources → From  
Microsoft Query  
4). Choose the DSN created in step 2 and click on ok  
5). enter credentials for the database if needed  
6). you should be prompted to select a table from the database, click  
next  
7). click next  
8). click next  
9). select “Return Data to Microsoft Excel” and click finish  
10). select where in the spreadsheet you’d like the data dumped to

And now you have the contents of the table dumped to Excel. From there  
you need to insert the data, so in the past I would use concat  
statements in Excel to create an INSERT statement, then copy and paste  
that in to a tool like WinSQL to bulk load data.

You do need to be wary if you are moving between different database  
enginers as some column types aren’t supported or work differently -  
mySQL plays it fast and loose, whereas DB2 can be a real syntax nazi.

And I believe foxpro is pretty pedantic about ODBC driver versions.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 24, 2014, 4:06am UTC](https://forums.suse.com/t/database-export/25889/8 "2014-07-24T04:06:05Z")

</div>

Steve:

You might check this:  
[http://stackoverflow.com/questions/16819811/how-to-convert-visual-foxp](http://stackoverflow.com/questions/16819811/how-to-convert-visual-foxp)  
ro-database-into-sql-server-database : )

–  
Susan  
Novell Community Chat Moderator

[http://forums.novell.com/faq.php?faq=novfor#faq\_rules](http://forums.novell.com/faq.php?faq=novfor#faq_rules)  
[http://www.ncci.org](http://www.ncci.org) NCCIrregulars Web Site  
[https://www.facebook.com/groups/NCCIrregulars](https://www.facebook.com/groups/NCCIrregulars)

Please read the following before posting in here:  
[http://preview.tinyurl.com/27zopdy](http://preview.tinyurl.com/27zopdy)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 24, 2014, 3:44pm UTC](https://forums.suse.com/t/database-export/25889/9 "2014-07-24T15:44:24Z")

</div>

On 23/07/2014 21:42, Stevo wrote:[color=blue]

> Dave Howe sounds like they ‘said’:  
> [color=green]
> 
> > odbc probably your friend there :)[/color]
> 
> So my response to Dave’s comment is…
> 
> We don’t have visual foxpro installed anywhere. This is from a small  
> software package developed by an outside source.[/color]

Foxpro odbc driver is a free download from ms site.  
you should be able to use it with DTS, or MS Access, to grab the data  
from the tables and/or report on it directly.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 24, 2014, 9:09pm UTC](https://forums.suse.com/t/database-export/25889/10 "2014-07-24T21:09:23Z")

</div>

Susan sounds like they ‘said’:  
[color=blue]

> Steve:
> 
> You might check this:  
> [http://stackoverflow.com/questions/16819811/how-to-convert-visual-foxp](http://stackoverflow.com/questions/16819811/how-to-convert-visual-foxp)  
> ro-database-into-sql-server-database : )[/color]

So my response to Susan’s comment is…

I had already looked that over, still pretty greek to me.

For stuff like this, I’m usually done if the server can be pinged. 😉

–  
Stevo

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 25, 2014, 1:41am UTC](https://forums.suse.com/t/database-export/25889/11 "2014-07-25T01:41:56Z")

</div>

Have you installed the FoxPro ODBC to see what you can see? 🙂

–  
Susan  
Novell Community Chat Moderator

[http://forums.novell.com/faq.php?faq=novfor#faq\_rules](http://forums.novell.com/faq.php?faq=novfor#faq_rules)  
[http://www.ncci.org](http://www.ncci.org) NCCIrregulars Web Site  
[https://www.facebook.com/groups/NCCIrregulars](https://www.facebook.com/groups/NCCIrregulars)

Please read the following before posting in here:  
[http://preview.tinyurl.com/27zopdy](http://preview.tinyurl.com/27zopdy)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 25, 2014, 1:45am UTC](https://forums.suse.com/t/database-export/25889/12 "2014-07-25T01:45:35Z")

</div>

Susan sounds like they ‘said’:  
[color=blue]

> Have you installed the FoxPro ODBC to see what you can see? :)[/color]

So my response to Susan’s comment is…

I have not, but a person in our dept (who has taken dba classes) figure  
out some stuff and I guess got the data extracted.

–  
Stevo

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [July 25, 2014, 5:32pm UTC](https://forums.suse.com/t/database-export/25889/13 "2014-07-25T17:32:47Z")

</div>

Yayyyyyyy! 🙂

–  
Susan  
Novell Community Chat Moderator

[http://forums.novell.com/faq.php?faq=novfor#faq\_rules](http://forums.novell.com/faq.php?faq=novfor#faq_rules)  
[http://www.ncci.org](http://www.ncci.org) NCCIrregulars Web Site  
[https://www.facebook.com/groups/NCCIrregulars](https://www.facebook.com/groups/NCCIrregulars)

Please read the following before posting in here:  
[http://preview.tinyurl.com/27zopdy](http://preview.tinyurl.com/27zopdy)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [September 5, 2014, 3:26pm UTC](https://forums.suse.com/t/database-export/25889/14 "2014-09-05T15:26:02Z")

</div>

Stevo,

Great - caught your post very late. I have plenty experience with VFP  
and data exporting if the need is still there.

Kevin

## – salisburyk

salisburyk’s Profile: [https://forums.novell.com/member.php?userid=5436](https://forums.novell.com/member.php?userid=5436)  
View this thread: [https://forums.novell.com/showthread.php?t=478404](https://forums.novell.com/showthread.php?t=478404)
