Showing posts with label dbf. Show all posts
Showing posts with label dbf. Show all posts

Monday, March 19, 2012

import dbf file to sql server 2005

there is a link out there for this but its referencing domething for
foxpro or something.
I use a product from ESRI the file are called shapefile(SHP)
its used as a mapping tool, with x,y's and stuff.
Anyway... I've export the data as a dbf, now I'd like to import this
data into a new empty table to be still created.
Will the wizard handle this. I really don't want to mess the database up
the dba would have a fit if you know what I mean.
OH very new to sql server sorry I was an Oracle brat before... so things
look really different to me, but hey just another tool right.
Any help would be great. THanks
Randy
*** Sent via Developersdex http://www.codecomments.com ***
Hi Randy
"randy davidson" wrote:

> there is a link out there for this but its referencing domething for
> foxpro or something.
> I use a product from ESRI the file are called shapefile(SHP)
> its used as a mapping tool, with x,y's and stuff.
> Anyway... I've export the data as a dbf, now I'd like to import this
> data into a new empty table to be still created.
> Will the wizard handle this. I really don't want to mess the database up
> the dba would have a fit if you know what I mean.
> OH very new to sql server sorry I was an Oracle brat before... so things
> look really different to me, but hey just another tool right.
> Any help would be great. THanks
> Randy
>
You may want to create your own sandbox database or possibly try this on
tempdb. If you have access to Enterprise Manager you can right click the
database and choose the Import Data option. As the datasource choose the
Visual Foxpro driver. dbf is the extension usually given to dBase and Foxpro
datafiles.
John

import dbf file to sql server 2005

there is a link out there for this but its referencing domething for
foxpro or something.
I use a product from ESRI the file are called shapefile(SHP)
its used as a mapping tool, with x,y's and stuff.
Anyway... I've export the data as a dbf, now I'd like to import this
data into a new empty table to be still created.
Will the wizard handle this. I really don't want to mess the database up
the dba would have a fit if you know what I mean.
OH very new to sql server sorry I was an Oracle brat before... so things
look really different to me, but hey just another tool right.
Any help would be great. THanks
Randy
*** Sent via Developersdex http://www.codecomments.com ***Hi Randy
"randy davidson" wrote:

> there is a link out there for this but its referencing domething for
> foxpro or something.
> I use a product from ESRI the file are called shapefile(SHP)
> its used as a mapping tool, with x,y's and stuff.
> Anyway... I've export the data as a dbf, now I'd like to import this
> data into a new empty table to be still created.
> Will the wizard handle this. I really don't want to mess the database up
> the dba would have a fit if you know what I mean.
> OH very new to sql server sorry I was an Oracle brat before... so things
> look really different to me, but hey just another tool right.
> Any help would be great. THanks
> Randy
>
You may want to create your own sandbox database or possibly try this on
tempdb. If you have access to Enterprise Manager you can right click the
database and choose the Import Data option. As the datasource choose the
Visual Foxpro driver. dbf is the extension usually given to dBase and Foxpro
datafiles.
John

import dbf file to sql server 2005

there is a link out there for this but its referencing domething for
foxpro or something.
I use a product from ESRI the file are called shapefile(SHP)
its used as a mapping tool, with x,y's and stuff.
Anyway... I've export the data as a dbf, now I'd like to import this
data into a new empty table to be still created.
Will the wizard handle this. I really don't want to mess the database up
the dba would have a fit if you know what I mean.
OH very new to sql server sorry I was an Oracle brat before... so things
look really different to me, but hey just another tool right.
Any help would be great. THanks
Randy
*** Sent via Developersdex http://www.developersdex.com ***Hi Randy
"randy davidson" wrote:
> there is a link out there for this but its referencing domething for
> foxpro or something.
> I use a product from ESRI the file are called shapefile(SHP)
> its used as a mapping tool, with x,y's and stuff.
> Anyway... I've export the data as a dbf, now I'd like to import this
> data into a new empty table to be still created.
> Will the wizard handle this. I really don't want to mess the database up
> the dba would have a fit if you know what I mean.
> OH very new to sql server sorry I was an Oracle brat before... so things
> look really different to me, but hey just another tool right.
> Any help would be great. THanks
> Randy
>
You may want to create your own sandbox database or possibly try this on
tempdb. If you have access to Enterprise Manager you can right click the
database and choose the Import Data option. As the datasource choose the
Visual Foxpro driver. dbf is the extension usually given to dBase and Foxpro
datafiles.
John

Import DBF File into SQL Server using vb.net

Hi,
I need to import dbf file into sql server. This dbf file is about 300 MB
with a 250,000 records. The import process needs to happen once a month.
I can create a DTS package and schedule it but the problem is that the
structure of DBF file (i.e. no. of columns) changes.
So, my solution was to:
1.) Read the schema of dbf file.
2.) Truncate and drop the table if it exist.
3.) Create table accordingly to the schema read in step 1.
4.) Output the dbf file to an xml file. (This step fails).
5.) Read the xml file. (never reaches this step).
6.) Create an index for a column that is going to be used for searching
records. (Hopefully will reach to this step).
Following is my code for step 4:
Dim strSql, strMsg As String
Dim myConnection As New OleDbConnection(m_strDBFConnection)
myConnection.Open()
Dim myCommand As New OleDbCommand(strSql, myConnection)
myCommand.CommandText = "Select Parcel.* From Parcel"
Dim myAdapter As New OleDbDataAdapter
myAdapter.SelectCommand = myCommand
Dim myDS As New DataSet
myAdapter.Fill(myDS) 'Take a long time here. In sql server it
take about 2 minutes to read th parcel table.
myDS.WriteXml("C:\parcel.xml")
I am using SQL 2K and .NET 2003.
If you need more explanation please let me know.
Thanks.
P.S.: I hope this is the right group for my query.Hi SQL Newbie,
Have you considered using a linked server? Then you can drop the table each
month and use Select ... Into SomeTable.
Be sure you have the latest FoxPro and Visual FoxPro OLE DB data provider,
downloadable from msdn.microsoft.com/vfoxpro/downloads/updates.
To set up the linked server you can use:
Use Master
Go
EXEC master.dbo.sp_addlinkedserver
@.server = N'MyLinkedServer',
@.srvproduct=N'Visual FoxPro 9',
@.provider=N'VFPOLEDB',
@.datasrc=N'"C:\MyPath\MyDirectory\"',
@.provstr=N'VFPOLEDB.1'
To select data you can use this as your command text:
Drop Table Parcel
- followed by -
Select * Into Parcel From MyLinkedServer...Parcel -- 3 dots are required.
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"SQL Newbie" <SQLNewbie@.discussions.microsoft.com> wrote in message
news:28349691-2D45-43FE-9B19-0DB798CB0D6F@.microsoft.com...
> Hi,
> I need to import dbf file into sql server. This dbf file is about 300 MB
> with a 250,000 records. The import process needs to happen once a month.
> I can create a DTS package and schedule it but the problem is that the
> structure of DBF file (i.e. no. of columns) changes.
> So, my solution was to:
> 1.) Read the schema of dbf file.
> 2.) Truncate and drop the table if it exist.
> 3.) Create table accordingly to the schema read in step 1.
> 4.) Output the dbf file to an xml file. (This step fails).
> 5.) Read the xml file. (never reaches this step).
> 6.) Create an index for a column that is going to be used for searching
> records. (Hopefully will reach to this step).
> Following is my code for step 4:
> Dim strSql, strMsg As String
> Dim myConnection As New OleDbConnection(m_strDBFConnection)
> myConnection.Open()
> Dim myCommand As New OleDbCommand(strSql, myConnection)
> myCommand.CommandText = "Select Parcel.* From Parcel"
> Dim myAdapter As New OleDbDataAdapter
> myAdapter.SelectCommand = myCommand
> Dim myDS As New DataSet
> myAdapter.Fill(myDS) 'Take a long time here. In sql server it
> take about 2 minutes to read th parcel table.
> myDS.WriteXml("C:\parcel.xml")
> I am using SQL 2K and .NET 2003.
> If you need more explanation please let me know.
> Thanks.
> P.S.: I hope this is the right group for my query.|||Hello Cindy,
The main reason for me doing all these was to let the customer decide when
he wants newer data in the database. My goal was to automate the whole
process and let customer do it with just a button click. The button click
would do the steps I mentioned in my initial post i.e.
> 1.) Read the schema of dbf file.
> 2.) Truncate and drop the table if it exist.
> 3.) Create table accordingly to the schema read in step 1.
> 4.) Output the dbf file to an xml file. (This step fails).
> 5.) Read the xml file. (never reaches this step).
> 6.) Create an index for a column that is going to be used for searching
> records. (Hopefully will reach to this step).
I cannot use linkedserver as I will have to drop it each month and I want to
let customer handle this.
But just now I got an idea. Please let me know what you think about it. It
is as follows:
Whenever the customer wants to new data I will just drop the existing linked
server and create a new one using sp_addlinkedserver.
Then, use this newly linked server for my applications.
Thanks for your response.
"Cindy Winegarden" wrote:

> Hi SQL Newbie,
> Have you considered using a linked server? Then you can drop the table eac
h
> month and use Select ... Into SomeTable.
> Be sure you have the latest FoxPro and Visual FoxPro OLE DB data provider,
> downloadable from msdn.microsoft.com/vfoxpro/downloads/updates.
> To set up the linked server you can use:
>
> Use Master
> Go
> EXEC master.dbo.sp_addlinkedserver
> @.server = N'MyLinkedServer',
> @.srvproduct=N'Visual FoxPro 9',
> @.provider=N'VFPOLEDB',
> @.datasrc=N'"C:\MyPath\MyDirectory\"',
> @.provstr=N'VFPOLEDB.1'
> To select data you can use this as your command text:
> Drop Table Parcel
> - followed by -
> Select * Into Parcel From MyLinkedServer...Parcel -- 3 dots are required.
>
> --
> Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
> cindy_winegarden@.msn.com www.cindywinegarden.com
>
> "SQL Newbie" <SQLNewbie@.discussions.microsoft.com> wrote in message
> news:28349691-2D45-43FE-9B19-0DB798CB0D6F@.microsoft.com...
>
>|||Hi Newbie,
The linked server is not the same as linking a table in Microsoft Access.
It's basically a permanent OLE DB connection to a data directory where the
DBFs are located. The linked server does not need to know the names or
structures of the tables it is linked to. Each time it's used it will look
in the directory it points to to find the table referenced in the T-SQL
Select (etc.) command.
Why don't you just write an SQL stored procedure to select from the source
table into an SQL Server table directly? It will create the SQL table for
you without your needing to know the table schema up front. Part of the
stored procedure can be to index whichever column you need to work with.
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"SQL Newbie" <SQLNewbie@.discussions.microsoft.com> wrote in message
news:5FD8DCF4-80C2-4A1D-923A-60A22F1676AF@.microsoft.com...
> Hello Cindy,
> The main reason for me doing all these was to let the customer decide when
> he wants newer data in the database. My goal was to automate the whole
> process and let customer do it with just a button click. The button click
> would do the steps I mentioned in my initial post i.e.
> I cannot use linkedserver as I will have to drop it each month and I want
> to
> let customer handle this.
> But just now I got an idea. Please let me know what you think about it. It
> is as follows:
> Whenever the customer wants to new data I will just drop the existing
> linked
> server and create a new one using sp_addlinkedserver.
> Then, use this newly linked server for my applications.|||Hello Cindy,
Your solution takes me back to my original post where I wanted to write the
dbf file to xml file and then read back into a table in SQL Server. If I am
not able to write the dbf file to xml file than the only solution for me
would be to iterate through the quarter million record and insert them
individually. I am looking for a more efficient way to import dbf file into
sql server either using stored procedures or vb.net or combination of both.
Your help is very much appreciated.
Thanks & Regards.
"Cindy Winegarden" wrote:

> Hi Newbie,
> The linked server is not the same as linking a table in Microsoft Access.
> It's basically a permanent OLE DB connection to a data directory where the
> DBFs are located. The linked server does not need to know the names or
> structures of the tables it is linked to. Each time it's used it will look
> in the directory it points to to find the table referenced in the T-SQL
> Select (etc.) command.
> Why don't you just write an SQL stored procedure to select from the source
> table into an SQL Server table directly? It will create the SQL table for
> you without your needing to know the table schema up front. Part of the
> stored procedure can be to index whichever column you need to work with.
> --
> Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
> cindy_winegarden@.msn.com www.cindywinegarden.com
>
> "SQL Newbie" <SQLNewbie@.discussions.microsoft.com> wrote in message
> news:5FD8DCF4-80C2-4A1D-923A-60A22F1676AF@.microsoft.com...
>
>|||Hi Newbie,
I think you're missing something when you read my posts. There is NO need
for XML.
I assume you will get the name of the DBF to import from a textbox on your
VB app's form. In your VB app you will execute SQL that calls a stored
procedure with a parameter of the name of the DBF.
I'm assuming the DBFs will always be in the same directory, so create a
Linked Server on the server and point it to the directory where the DBFs
will be kept. Assuming you have installed the VFP OLE DB data provider, you
can follow this example:
-- ----
EXEC master.dbo.sp_addlinkedserver
@.server = N'VFPTest',
@.srvproduct=N'Your description here',
@.provider=N'VFPOLEDB',
@.datasrc=N'"C:\Temp\"',
@.provstr=N'VFPOLEDB.1'
-- ----
Write an SQL stored procedure that takes the name of the new file as a
parameter.
-- ----
Create Procedure dbo.spImportData
@.TableName VarChar(10)
As
Declare @.SelectCommand VarChar(100)
-- Delete existing table
If Exists
(Select * From Sys.Objects Where Object_ID =
Object_ID(N'dbo.VFPImport') And Type In (N'U'))
Drop Table dbo.VFPImport
-- Import new data
Select @.Selectcommand =
'Select * Into dbo.VFPImport From VFPTest...' + @.TableName
Exec (@.Selectcommand)
Go
-- ----
Here's some VB code to test it all out:
-- ----
Imports System
Imports System.Data
Imports System.Data.OleDb
Module Module1
Sub Main()
Try
'-- Make some VFP data to play with
Dim cn1 As New OleDbConnection( _
"Provider=VFPOLEDB.1;Data Source=C:\Temp\;")
cn1.Open()
Dim cmd1 As New OleDbCommand( _
"Create Table TestImport (Field1 C(10))", cn1)
Dim cmd2 As New OleDbCommand( _
"Insert Into TestImport Values ('HelloWorld')", cn1)
cmd1.ExecuteNonQuery()
cmd2.ExecuteNonQuery()
'-- Connect to the SQL Server to run your stored proc
Dim cn2 As New SqlClient.SqlConnection( _
"Data Source = C-K-Winegarden;Initial Catalog = Test;" + _
"Integrated Security = True;")
cn2.Open()
'-- Assume you'll be getting tableName from a TextBox on a form
Dim tableName As New String("TestImport")
Dim cmd3 As New SqlClient.SqlCommand( _
"Exec dbo.spImportData @.TableName = " + tableName, cn2)
cmd3.ExecuteNonQuery()
cn1.Close()
cn2.Close()
Catch e As Exception
MsgBox(e.ToString())
End Try
End Sub
End Module
-- ----
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"SQL Newbie" <SQLNewbie@.discussions.microsoft.com> wrote in message
news:013AF82C-60AC-45E0-927B-5EBFB321BE69@.microsoft.com...
> Hello Cindy,
> Your solution takes me back to my original post where I wanted to write
> the
> dbf file to xml file and then read back into a table in SQL Server. If I
> am
> not able to write the dbf file to xml file than the only solution for me
> would be to iterate through the quarter million record and insert them
> individually. I am looking for a more efficient way to import dbf file
> into
> sql server either using stored procedures or vb.net or combination of
> both.

Import DBF data to a MySQL Table

Hi
I'm trying to sync a DBF file stored on my customer server with the
MySQL table on my server.
I'm still looking for an automatic way to do it, however, for now i'm
trying to find a way to create a small app that will help me do it
faster than manually.
My question is: how do I import the data from my DBF file to my MySQL
Server?
I already have the code to select data from the DBF, but can't seems to
be able to find a fast way to import it. I tried the way of inserting
each line, but its really slow since I have aroung 10,000 rows.
Any idea that would make the process faster ?
Thanks!
EricI think you bought a ticket to the wrong show. You should probably search
for a MySQL newsgroup...
<ericpoirier@.gmail.com> wrote in message
news:1149186767.242174.200480@.c74g2000cwc.googlegroups.com...
> Hi
> I'm trying to sync a DBF file stored on my customer server with the
> MySQL table on my server.
> I'm still looking for an automatic way to do it, however, for now i'm
> trying to find a way to create a small app that will help me do it
> faster than manually.
> My question is: how do I import the data from my DBF file to my MySQL
> Server?
> I already have the code to select data from the DBF, but can't seems to
> be able to find a fast way to import it. I tried the way of inserting
> each line, but its really slow since I have aroung 10,000 rows.
> Any idea that would make the process faster ?
> Thanks!
> Eric
>|||Yeah I know, new here and don't know how to delete posts.
Mike C# wrote:
> I think you bought a ticket to the wrong show. You should probably search
> for a MySQL newsgroup...
> <ericpoirier@.gmail.com> wrote in message
> news:1149186767.242174.200480@.c74g2000cwc.googlegroups.com...|||MySQL can import a comma separated value text file in a very short time. My
experience was 1.2 million records in about 10 seconds. If you can export th
e
MS SQL data as comma separated value file, then have a VB Script or program
to import the file into MySQL data base. There are several 3rd party
applications that will convert data from one database to another.
"ericpoirier@.gmail.com" wrote:

> Hi
> I'm trying to sync a DBF file stored on my customer server with the
> MySQL table on my server.
> I'm still looking for an automatic way to do it, however, for now i'm
> trying to find a way to create a small app that will help me do it
> faster than manually.
> My question is: how do I import the data from my DBF file to my MySQL
> Server?
> I already have the code to select data from the DBF, but can't seems to
> be able to find a fast way to import it. I tried the way of inserting
> each line, but its really slow since I have aroung 10,000 rows.
> Any idea that would make the process faster ?
> Thanks!
> Eric
>

Import DBF

Hi There! I have a problem with a DBF file. The problem is that somebody gaves me a data base in DBF format and he uses in SQL Server 2000 and EMS SQL Manager. Well, I have to instal the MDE and SQL Enterprise Manager and when I use the DTS tool to import the data I've got this error:

'Error not Especified'

and I don't know what's happen and how to solve it. Please! Any ideas!

("Sorry about my english")i would like at the sql server error log but I am guessing you do not have the right database driver for the type of database you are trying to import.|||hi, is a dbase files? try test your odbc with the Excel query, maybe, your problem is the connection. test this and tell me.

IMPORT DBASE IV (DBF) FILE TO SQL SERVER 2005

Hi,
I am wondering if anyone knows of a reliable tool for importing Foxpro
(dbase) (dbf) files to SQL Server?
I have inherted this task from a former employee. I have been using an
Access database with an ODBC link to SQL Server for the import task -
and it worked fine until last week. For some reason, it just quit
importing one of the dbase files.
So, I tried use "db workbench" to convert the dbase file to a text file
first, then tried to import it into Access. It apparently "worked", but
the data got totally corrupted in the process.
Now, I am back at square one - and I need a tool I can use to either
1.) import the dbase file directly to SQL Server, or 2.) a reliable
tool for converting the dbase file to a text file, csv, or xls file for
importing into SQL Server.
Any ideas/suggestions greatly appreciated!
Thanks much
CORRECTION: I used "DBF Viewer", not "db workbench" to convert to text
file
tootsu...@.gmail.com wrote:
> Hi,
> I am wondering if anyone knows of a reliable tool for importing Foxpro
> (dbase) (dbf) files to SQL Server?
> I have inherted this task from a former employee. I have been using an
> Access database with an ODBC link to SQL Server for the import task -
> and it worked fine until last week. For some reason, it just quit
> importing one of the dbase files.
> So, I tried use "db workbench" to convert the dbase file to a text file
> first, then tried to import it into Access. It apparently "worked", but
> the data got totally corrupted in the process.
> Now, I am back at square one - and I need a tool I can use to either
> 1.) import the dbase file directly to SQL Server, or 2.) a reliable
> tool for converting the dbase file to a text file, csv, or xls file for
> importing into SQL Server.
> Any ideas/suggestions greatly appreciated!
> Thanks much
|||I have the same issue, and found that the driver for dbf files is not
included in the sql2005 install. I had to go to msdn.microsoft.com to get
the foxpro driver files and installed it. I can now at least locate the dbf
and attempt the import, but it is only importing the first 20 rows of 16,000
set. Interested to see what other answers you get becasue I could get only
one person even attempting to help me, and she got me as far as this.
<tootsuite@.gmail.com> wrote in message
news:1158866292.228863.307680@.h48g2000cwc.googlegr oups.com...
> Hi,
> I am wondering if anyone knows of a reliable tool for importing Foxpro
> (dbase) (dbf) files to SQL Server?
> I have inherted this task from a former employee. I have been using an
> Access database with an ODBC link to SQL Server for the import task -
> and it worked fine until last week. For some reason, it just quit
> importing one of the dbase files.
> So, I tried use "db workbench" to convert the dbase file to a text file
> first, then tried to import it into Access. It apparently "worked", but
> the data got totally corrupted in the process.
> Now, I am back at square one - and I need a tool I can use to either
> 1.) import the dbase file directly to SQL Server, or 2.) a reliable
> tool for converting the dbase file to a text file, csv, or xls file for
> importing into SQL Server.
> Any ideas/suggestions greatly appreciated!
> Thanks much
>
|||Update - I just discovered the *easiest* way to do this! You can open
DBF files with Microsoft Excel - then just save as an xls - then import
- viola - works!
Don't know why I didn't discover this earlier. No need for any special
tools, or dts.
JC HARRIS wrote:[vbcol=seagreen]
> I have the same issue, and found that the driver for dbf files is not
> included in the sql2005 install. I had to go to msdn.microsoft.com to get
> the foxpro driver files and installed it. I can now at least locate the dbf
> and attempt the import, but it is only importing the first 20 rows of 16,000
> set. Interested to see what other answers you get becasue I could get only
> one person even attempting to help me, and she got me as far as this.
>
> <tootsuite@.gmail.com> wrote in message
> news:1158866292.228863.307680@.h48g2000cwc.googlegr oups.com...
|||Hi!
Yes, older format DBFs can be opened with Excel but you will lose the
content of any Memo fields. As an alternative you can download and install
the FoxPro and Visual FoxPro OLE DB data provider from
msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
Import Wizard or set up a linked server.
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@.cindywinegarden.com
<tootsuite@.gmail.com> wrote in message
news:1158874680.304855.200110@.h48g2000cwc.googlegr oups.com...
> Update - I just discovered the *easiest* way to do this! You can open
> DBF files with Microsoft Excel - then just save as an xls - then import
> - viola - works!
[vbcol=seagreen]
|||What Cindy says is correct. I could not use the excel method because of the
dbf size (overflows the excel program). I followed Cindy's instrcution on
another newsgroup and it worked great.
"Cindy Winegarden" <cindy@.cindywinegarden.com> wrote in message
news:OwD1qPl3GHA.4924@.TK2MSFTNGP05.phx.gbl...
> Hi!
> Yes, older format DBFs can be opened with Excel but you will lose the
> content of any Memo fields. As an alternative you can download and install
> the FoxPro and Visual FoxPro OLE DB data provider from
> msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
> Import Wizard or set up a linked server.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy@.cindywinegarden.com
>
> <tootsuite@.gmail.com> wrote in message
> news:1158874680.304855.200110@.h48g2000cwc.googlegr oups.com...
>
>
|||Hi Cindy,
Thanks for the information. I don't know if I have any memo fields -
how can I tell?
Would the column just show up as blank in Excel?
Thanks!
Cindy Winegarden wrote:[vbcol=seagreen]
> Hi!
> Yes, older format DBFs can be opened with Excel but you will lose the
> content of any Memo fields. As an alternative you can download and install
> the FoxPro and Visual FoxPro OLE DB data provider from
> msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
> Import Wizard or set up a linked server.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy@.cindywinegarden.com
>
> <tootsuite@.gmail.com> wrote in message
> news:1158874680.304855.200110@.h48g2000cwc.googlegr oups.com...
|||Hi Cindy,
Yes, I see what you mean - the memo fields are blank in Excel.
I went to the link you listed below, but I don't know which file to
download? They all seem like service packs. Is this the right page?
Help.
THANKS
Cindy Winegarden wrote:[vbcol=seagreen]
> Hi!
> Yes, older format DBFs can be opened with Excel but you will lose the
> content of any Memo fields. As an alternative you can download and install
> the FoxPro and Visual FoxPro OLE DB data provider from
> msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
> Import Wizard or set up a linked server.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy@.cindywinegarden.com
>
> <tootsuite@.gmail.com> wrote in message
> news:1158874680.304855.200110@.h48g2000cwc.googlegr oups.com...
|||"JC HARRIS" <harris1113@.fake.com> wrote in message
news:%230YkfWm3GHA.4976@.TK2MSFTNGP02.phx.gbl...
> What Cindy says is correct. I could not use the excel method because of
the
> dbf size (overflows the excel program). I followed Cindy's instrcution on
> another newsgroup and it worked great.
If you have it available, you might the Office 2007 Beta version of Excel.
It increases the number of records immensely.
Jonathan
|||Hi!
http://msdn.microsoft.com/vfoxpro/downloads/updates/ , second item. It
points to
http://www.microsoft.com/downloads/d...displaylang=en .
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@.cindywinegarden.com
<tootsuite@.gmail.com> wrote in message
news:1158946224.807292.64180@.m7g2000cwm.googlegrou ps.com...
> Hi Cindy,
> Yes, I see what you mean - the memo fields are blank in Excel.
> I went to the link you listed below, but I don't know which file to
> download? They all seem like service packs. Is this the right page?
> Help.
> THANKS
>
> Cindy Winegarden wrote:
>

IMPORT DBASE IV (DBF) FILE TO SQL SERVER 2005

Hi,
I am wondering if anyone knows of a reliable tool for importing Foxpro
(dbase) (dbf) files to SQL Server?
I have inherted this task from a former employee. I have been using an
Access database with an ODBC link to SQL Server for the import task -
and it worked fine until last week. For some reason, it just quit
importing one of the dbase files.
So, I tried use "db workbench" to convert the dbase file to a text file
first, then tried to import it into Access. It apparently "worked", but
the data got totally corrupted in the process.
Now, I am back at square one - and I need a tool I can use to either
1.) import the dbase file directly to SQL Server, or 2.) a reliable
tool for converting the dbase file to a text file, csv, or xls file for
importing into SQL Server.
Any ideas/suggestions greatly appreciated!
Thanks muchCORRECTION: I used "DBF Viewer", not "db workbench" to convert to text
file
tootsu...@.gmail.com wrote:
> Hi,
> I am wondering if anyone knows of a reliable tool for importing Foxpro
> (dbase) (dbf) files to SQL Server?
> I have inherted this task from a former employee. I have been using an
> Access database with an ODBC link to SQL Server for the import task -
> and it worked fine until last week. For some reason, it just quit
> importing one of the dbase files.
> So, I tried use "db workbench" to convert the dbase file to a text file
> first, then tried to import it into Access. It apparently "worked", but
> the data got totally corrupted in the process.
> Now, I am back at square one - and I need a tool I can use to either
> 1.) import the dbase file directly to SQL Server, or 2.) a reliable
> tool for converting the dbase file to a text file, csv, or xls file for
> importing into SQL Server.
> Any ideas/suggestions greatly appreciated!
> Thanks much|||I have the same issue, and found that the driver for dbf files is not
included in the sql2005 install. I had to go to msdn.microsoft.com to get
the foxpro driver files and installed it. I can now at least locate the dbf
and attempt the import, but it is only importing the first 20 rows of 16,000
set. Interested to see what other answers you get becasue I could get only
one person even attempting to help me, and she got me as far as this.
<tootsuite@.gmail.com> wrote in message
news:1158866292.228863.307680@.h48g2000cwc.googlegroups.com...
> Hi,
> I am wondering if anyone knows of a reliable tool for importing Foxpro
> (dbase) (dbf) files to SQL Server?
> I have inherted this task from a former employee. I have been using an
> Access database with an ODBC link to SQL Server for the import task -
> and it worked fine until last week. For some reason, it just quit
> importing one of the dbase files.
> So, I tried use "db workbench" to convert the dbase file to a text file
> first, then tried to import it into Access. It apparently "worked", but
> the data got totally corrupted in the process.
> Now, I am back at square one - and I need a tool I can use to either
> 1.) import the dbase file directly to SQL Server, or 2.) a reliable
> tool for converting the dbase file to a text file, csv, or xls file for
> importing into SQL Server.
> Any ideas/suggestions greatly appreciated!
> Thanks much
>|||Update - I just discovered the *easiest* way to do this! You can open
DBF files with Microsoft Excel - then just save as an xls - then import
- viola - works!
Don't know why I didn't discover this earlier. No need for any special
tools, or dts.
JC HARRIS wrote:
> I have the same issue, and found that the driver for dbf files is not
> included in the sql2005 install. I had to go to msdn.microsoft.com to get
> the foxpro driver files and installed it. I can now at least locate the dbf
> and attempt the import, but it is only importing the first 20 rows of 16,000
> set. Interested to see what other answers you get becasue I could get only
> one person even attempting to help me, and she got me as far as this.
>
> <tootsuite@.gmail.com> wrote in message
> news:1158866292.228863.307680@.h48g2000cwc.googlegroups.com...
> > Hi,
> >
> > I am wondering if anyone knows of a reliable tool for importing Foxpro
> > (dbase) (dbf) files to SQL Server?
> >
> > I have inherted this task from a former employee. I have been using an
> > Access database with an ODBC link to SQL Server for the import task -
> > and it worked fine until last week. For some reason, it just quit
> > importing one of the dbase files.
> >
> > So, I tried use "db workbench" to convert the dbase file to a text file
> > first, then tried to import it into Access. It apparently "worked", but
> > the data got totally corrupted in the process.
> >
> > Now, I am back at square one - and I need a tool I can use to either
> > 1.) import the dbase file directly to SQL Server, or 2.) a reliable
> > tool for converting the dbase file to a text file, csv, or xls file for
> > importing into SQL Server.
> >
> > Any ideas/suggestions greatly appreciated!
> >
> > Thanks much
> >|||Hi!
Yes, older format DBFs can be opened with Excel but you will lose the
content of any Memo fields. As an alternative you can download and install
the FoxPro and Visual FoxPro OLE DB data provider from
msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
Import Wizard or set up a linked server.
--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@.cindywinegarden.com
<tootsuite@.gmail.com> wrote in message
news:1158874680.304855.200110@.h48g2000cwc.googlegroups.com...
> Update - I just discovered the *easiest* way to do this! You can open
> DBF files with Microsoft Excel - then just save as an xls - then import
> - viola - works!
>> > I am wondering if anyone knows of a reliable tool for importing Foxpro
>> > (dbase) (dbf) files to SQL Server? ...|||What Cindy says is correct. I could not use the excel method because of the
dbf size (overflows the excel program). I followed Cindy's instrcution on
another newsgroup and it worked great.
"Cindy Winegarden" <cindy@.cindywinegarden.com> wrote in message
news:OwD1qPl3GHA.4924@.TK2MSFTNGP05.phx.gbl...
> Hi!
> Yes, older format DBFs can be opened with Excel but you will lose the
> content of any Memo fields. As an alternative you can download and install
> the FoxPro and Visual FoxPro OLE DB data provider from
> msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
> Import Wizard or set up a linked server.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy@.cindywinegarden.com
>
> <tootsuite@.gmail.com> wrote in message
> news:1158874680.304855.200110@.h48g2000cwc.googlegroups.com...
>> Update - I just discovered the *easiest* way to do this! You can open
>> DBF files with Microsoft Excel - then just save as an xls - then import
>> - viola - works!
>> > I am wondering if anyone knows of a reliable tool for importing Foxpro
>> > (dbase) (dbf) files to SQL Server? ...
>
>|||Hi Cindy,
Thanks for the information. I don't know if I have any memo fields -
how can I tell?
Would the column just show up as blank in Excel?
Thanks!
Cindy Winegarden wrote:
> Hi!
> Yes, older format DBFs can be opened with Excel but you will lose the
> content of any Memo fields. As an alternative you can download and install
> the FoxPro and Visual FoxPro OLE DB data provider from
> msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
> Import Wizard or set up a linked server.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy@.cindywinegarden.com
>
> <tootsuite@.gmail.com> wrote in message
> news:1158874680.304855.200110@.h48g2000cwc.googlegroups.com...
> > Update - I just discovered the *easiest* way to do this! You can open
> > DBF files with Microsoft Excel - then just save as an xls - then import
> > - viola - works!
> >> > I am wondering if anyone knows of a reliable tool for importing Foxpro
> >> > (dbase) (dbf) files to SQL Server? ...|||Hi Cindy,
Yes, I see what you mean - the memo fields are blank in Excel.
I went to the link you listed below, but I don't know which file to
download? They all seem like service packs. Is this the right page?
Help.
THANKS
Cindy Winegarden wrote:
> Hi!
> Yes, older format DBFs can be opened with Excel but you will lose the
> content of any Memo fields. As an alternative you can download and install
> the FoxPro and Visual FoxPro OLE DB data provider from
> msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
> Import Wizard or set up a linked server.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy@.cindywinegarden.com
>
> <tootsuite@.gmail.com> wrote in message
> news:1158874680.304855.200110@.h48g2000cwc.googlegroups.com...
> > Update - I just discovered the *easiest* way to do this! You can open
> > DBF files with Microsoft Excel - then just save as an xls - then import
> > - viola - works!
> >> > I am wondering if anyone knows of a reliable tool for importing Foxpro
> >> > (dbase) (dbf) files to SQL Server? ...|||"JC HARRIS" <harris1113@.fake.com> wrote in message
news:%230YkfWm3GHA.4976@.TK2MSFTNGP02.phx.gbl...
> What Cindy says is correct. I could not use the excel method because of
the
> dbf size (overflows the excel program). I followed Cindy's instrcution on
> another newsgroup and it worked great.
If you have it available, you might the Office 2007 Beta version of Excel.
It increases the number of records immensely.
Jonathan|||Hi!
http://msdn.microsoft.com/vfoxpro/downloads/updates/ , second item. It
points to
http://www.microsoft.com/downloads/details.aspx?FamilyId=E1A87D8F-2D58-491F-A0FA-95A3289C5FD4&displaylang=en .
--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@.cindywinegarden.com
<tootsuite@.gmail.com> wrote in message
news:1158946224.807292.64180@.m7g2000cwm.googlegroups.com...
> Hi Cindy,
> Yes, I see what you mean - the memo fields are blank in Excel.
> I went to the link you listed below, but I don't know which file to
> download? They all seem like service packs. Is this the right page?
> Help.
> THANKS
>
> Cindy Winegarden wrote:
>> Hi!
>> Yes, older format DBFs can be opened with Excel but you will lose the
>> content of any Memo fields. As an alternative you can download and
>> install
>> the FoxPro and Visual FoxPro OLE DB data provider from
>> msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
>> Import Wizard or set up a linked server.
>> --
>> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
>> cindy@.cindywinegarden.com
>>
>> <tootsuite@.gmail.com> wrote in message
>> news:1158874680.304855.200110@.h48g2000cwc.googlegroups.com...
>> > Update - I just discovered the *easiest* way to do this! You can open
>> > DBF files with Microsoft Excel - then just save as an xls - then import
>> > - viola - works!
>> >> > I am wondering if anyone knows of a reliable tool for importing
>> >> > Foxpro
>> >> > (dbase) (dbf) files to SQL Server? ...
>|||*** Sent via Developersdex http://www.developersdex.com ***

IMPORT DBASE IV (DBF) FILE TO SQL SERVER 2005

Hi,
I am wondering if anyone knows of a reliable tool for importing Foxpro
(dbase) (dbf) files to SQL Server?
I have inherted this task from a former employee. I have been using an
Access database with an ODBC link to SQL Server for the import task -
and it worked fine until last week. For some reason, it just quit
importing one of the dbase files.
So, I tried use "db workbench" to convert the dbase file to a text file
first, then tried to import it into Access. It apparently "worked", but
the data got totally corrupted in the process.
Now, I am back at square one - and I need a tool I can use to either
1.) import the dbase file directly to SQL Server, or 2.) a reliable
tool for converting the dbase file to a text file, csv, or xls file for
importing into SQL Server.
Any ideas/suggestions greatly appreciated!
Thanks muchCORRECTION: I used "DBF Viewer", not "db workbench" to convert to text
file
tootsu...@.gmail.com wrote:
> Hi,
> I am wondering if anyone knows of a reliable tool for importing Foxpro
> (dbase) (dbf) files to SQL Server?
> I have inherted this task from a former employee. I have been using an
> Access database with an ODBC link to SQL Server for the import task -
> and it worked fine until last week. For some reason, it just quit
> importing one of the dbase files.
> So, I tried use "db workbench" to convert the dbase file to a text file
> first, then tried to import it into Access. It apparently "worked", but
> the data got totally corrupted in the process.
> Now, I am back at square one - and I need a tool I can use to either
> 1.) import the dbase file directly to SQL Server, or 2.) a reliable
> tool for converting the dbase file to a text file, csv, or xls file for
> importing into SQL Server.
> Any ideas/suggestions greatly appreciated!
> Thanks much|||I have the same issue, and found that the driver for dbf files is not
included in the sql2005 install. I had to go to msdn.microsoft.com to get
the foxpro driver files and installed it. I can now at least locate the dbf
and attempt the import, but it is only importing the first 20 rows of 16,000
set. Interested to see what other answers you get becasue I could get only
one person even attempting to help me, and she got me as far as this.
<tootsuite@.gmail.com> wrote in message
news:1158866292.228863.307680@.h48g2000cwc.googlegroups.com...
> Hi,
> I am wondering if anyone knows of a reliable tool for importing Foxpro
> (dbase) (dbf) files to SQL Server?
> I have inherted this task from a former employee. I have been using an
> Access database with an ODBC link to SQL Server for the import task -
> and it worked fine until last week. For some reason, it just quit
> importing one of the dbase files.
> So, I tried use "db workbench" to convert the dbase file to a text file
> first, then tried to import it into Access. It apparently "worked", but
> the data got totally corrupted in the process.
> Now, I am back at square one - and I need a tool I can use to either
> 1.) import the dbase file directly to SQL Server, or 2.) a reliable
> tool for converting the dbase file to a text file, csv, or xls file for
> importing into SQL Server.
> Any ideas/suggestions greatly appreciated!
> Thanks much
>|||Update - I just discovered the *easiest* way to do this! You can open
DBF files with Microsoft Excel - then just save as an xls - then import
- viola - works!
Don't know why I didn't discover this earlier. No need for any special
tools, or dts.
JC HARRIS wrote:[vbcol=seagreen]
> I have the same issue, and found that the driver for dbf files is not
> included in the sql2005 install. I had to go to msdn.microsoft.com to get
> the foxpro driver files and installed it. I can now at least locate the db
f
> and attempt the import, but it is only importing the first 20 rows of 16,0
00
> set. Interested to see what other answers you get becasue I could get only
> one person even attempting to help me, and she got me as far as this.
>
> <tootsuite@.gmail.com> wrote in message
> news:1158866292.228863.307680@.h48g2000cwc.googlegroups.com...|||Hi!
Yes, older format DBFs can be opened with Excel but you will lose the
content of any Memo fields. As an alternative you can download and install
the FoxPro and Visual FoxPro OLE DB data provider from
msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
Import Wizard or set up a linked server.
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@.cindywinegarden.com
<tootsuite@.gmail.com> wrote in message
news:1158874680.304855.200110@.h48g2000cwc.googlegroups.com...
> Update - I just discovered the *easiest* way to do this! You can open
> DBF files with Microsoft Excel - then just save as an xls - then import
> - viola - works!
[vbcol=seagreen]|||What Cindy says is correct. I could not use the excel method because of the
dbf size (overflows the excel program). I followed Cindy's instrcution on
another newsgroup and it worked great.
"Cindy Winegarden" <cindy@.cindywinegarden.com> wrote in message
news:OwD1qPl3GHA.4924@.TK2MSFTNGP05.phx.gbl...
> Hi!
> Yes, older format DBFs can be opened with Excel but you will lose the
> content of any Memo fields. As an alternative you can download and install
> the FoxPro and Visual FoxPro OLE DB data provider from
> msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
> Import Wizard or set up a linked server.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy@.cindywinegarden.com
>
> <tootsuite@.gmail.com> wrote in message
> news:1158874680.304855.200110@.h48g2000cwc.googlegroups.com...
>
>
>|||Hi Cindy,
Thanks for the information. I don't know if I have any memo fields -
how can I tell?
Would the column just show up as blank in Excel?
Thanks!
Cindy Winegarden wrote:[vbcol=seagreen]
> Hi!
> Yes, older format DBFs can be opened with Excel but you will lose the
> content of any Memo fields. As an alternative you can download and install
> the FoxPro and Visual FoxPro OLE DB data provider from
> msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
> Import Wizard or set up a linked server.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy@.cindywinegarden.com
>
> <tootsuite@.gmail.com> wrote in message
> news:1158874680.304855.200110@.h48g2000cwc.googlegroups.com...
>|||Hi Cindy,
Yes, I see what you mean - the memo fields are blank in Excel.
I went to the link you listed below, but I don't know which file to
download? They all seem like service packs. Is this the right page?
Help.
THANKS
Cindy Winegarden wrote:[vbcol=seagreen]
> Hi!
> Yes, older format DBFs can be opened with Excel but you will lose the
> content of any Memo fields. As an alternative you can download and install
> the FoxPro and Visual FoxPro OLE DB data provider from
> msdn.microsoft.com/vfoxpro/downloads/updates and then use the SQL Server
> Import Wizard or set up a linked server.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy@.cindywinegarden.com
>
> <tootsuite@.gmail.com> wrote in message
> news:1158874680.304855.200110@.h48g2000cwc.googlegroups.com...
>|||"JC HARRIS" <harris1113@.fake.com> wrote in message
news:%230YkfWm3GHA.4976@.TK2MSFTNGP02.phx.gbl...
> What Cindy says is correct. I could not use the excel method because of
the
> dbf size (overflows the excel program). I followed Cindy's instrcution on
> another newsgroup and it worked great.
If you have it available, you might the Office 2007 Beta version of Excel.
It increases the number of records immensely.
Jonathan|||Hi!
http://msdn.microsoft.com/vfoxpro/downloads/updates/ , second item. It
points to
http://www.microsoft.com/downloads/...&displaylang=en .
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@.cindywinegarden.com
<tootsuite@.gmail.com> wrote in message
news:1158946224.807292.64180@.m7g2000cwm.googlegroups.com...
> Hi Cindy,
> Yes, I see what you mean - the memo fields are blank in Excel.
> I went to the link you listed below, but I don't know which file to
> download? They all seem like service packs. Is this the right page?
> Help.
> THANKS
>
> Cindy Winegarden wrote:
>

Monday, March 12, 2012

Import Data from Excel problem

I got a table which got over 50 fields from an excel files.
Now I can import them into a temp.dbf file . I found that the field type
defined as nvarchar 255.
I use SP to write a insert these data to another real table. (some field is
char20, . 50. 20...etc)
The problem is As I run the insert statment .I will got [String or binary
data would be truncated] <-- error
I don't want to modify the structure of temp.dbf.
Any method that I can ignore That error and import the data ?
Thanks
you can put 'trims' around the fields in your select
look up ltrim and rtrim in BOL
"Agnes" <agnes@.dynamictech.com.hk> wrote in message
news:u43g$QvLFHA.732@.TK2MSFTNGP12.phx.gbl...
>I got a table which got over 50 fields from an excel files.
> Now I can import them into a temp.dbf file . I found that the field type
> defined as nvarchar 255.
> I use SP to write a insert these data to another real table. (some field
> is char20, . 50. 20...etc)
> The problem is As I run the insert statment .I will got [String or binary
> data would be truncated] <-- error
> I don't want to modify the structure of temp.dbf.
> Any method that I can ignore That error and import the data ?
> Thanks
>