|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to create an empty Dbase IV database?Hi,
I am writing a software using VB.Net 2005 to convert MS Access and Dbase IV database to XML and vise versa. So far, I have got everything working except, I couldn't find any example of creating an empty Dbase IV database at runtime. I would appreciate if any one here could give me a lead on this. Regards Sanjib Sanjib,
I don't know if it exist, however in your place I would start searching on Internet using "FoxPro" instead of dbase IV. It is few, however maybe it helps, Cor In the event that you can't find a way to create an empty
one at runtime, you could always manually create an empty one and just copy the file at runtime. Show quote "Sanjib Biswas" <sanjib.bis***@ieee.org> wrote in message news:eo3wp4o4FHA.2364@TK2MSFTNGP12.phx.gbl... > Hi, > > I am writing a software using VB.Net 2005 to convert MS Access and > Dbase IV database to XML and vise versa. So far, I have got everything > working except, I couldn't find any example of creating an empty Dbase IV > database at runtime. I would appreciate if any one here could give me a > lead on this. > > Regards > Sanjib > On Sun, 6 Nov 2005 15:54:26 +1100, "Sanjib Biswas" <sanjib.bis***@ieee.org> wrote: ¤ Hi,¤ ¤ I am writing a software using VB.Net 2005 to convert MS Access and ¤ Dbase IV database to XML and vise versa. So far, I have got everything ¤ working except, I couldn't find any example of creating an empty Dbase IV ¤ database at runtime. I would appreciate if any one here could give me a lead ¤ on this. You can use the Jet OLEDB/dBase ISAM driver combination and Jet SQL. Just keep in mind that dBase won't support all Jet SQL: Dim dBaseConnection As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & "e:\My Documents\dBase" & ";" & _ "Extended Properties=dBase IV") dBaseConnection.Open() 'New table Dim SQLCreateCommand As String SQLCreateCommand = "CREATE TABLE Customer " & _ "(CustomerID INTEGER," & _ "LastName TEXT(50), " & _ "FirstName TEXT(50)," & _ "Phone TEXT(10)," & _ "Email TEXT(50))" Dim dBaseCommand As New System.Data.OleDb.OleDbCommand(SQLCreateCommand, dBaseConnection) dBaseCommand.ExecuteNonQuery() dBaseConnection.Close() Paul ~~~~ Microsoft MVP (Visual Basic) Hi Paul,
Thanks a lot for the tips.. Regards Sanjib Show quote "Paul Clement" <UseAdddressAtEndofMess***@swspectrum.com> wrote in message news:62tum1dlfvamna3sfm6framju0k6hmbued@4ax.com... > On Sun, 6 Nov 2005 15:54:26 +1100, "Sanjib Biswas" > <sanjib.bis***@ieee.org> wrote: > > ¤ Hi, > ¤ > ¤ I am writing a software using VB.Net 2005 to convert MS Access and > ¤ Dbase IV database to XML and vise versa. So far, I have got everything > ¤ working except, I couldn't find any example of creating an empty Dbase > IV > ¤ database at runtime. I would appreciate if any one here could give me a > lead > ¤ on this. > > You can use the Jet OLEDB/dBase ISAM driver combination and Jet SQL. Just > keep in mind that dBase > won't support all Jet SQL: > > Dim dBaseConnection As New > System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _ > "Data > Source=" & "e:\My > Documents\dBase" & ";" & _ > > "Extended Properties=dBase IV") > > dBaseConnection.Open() > > 'New table > Dim SQLCreateCommand As String > SQLCreateCommand = "CREATE TABLE Customer " & _ > "(CustomerID INTEGER," & _ > "LastName TEXT(50), " & _ > "FirstName TEXT(50)," & _ > "Phone TEXT(10)," & _ > "Email TEXT(50))" > > Dim dBaseCommand As New > System.Data.OleDb.OleDbCommand(SQLCreateCommand, dBaseConnection) > > dBaseCommand.ExecuteNonQuery() > dBaseConnection.Close() > > > Paul > ~~~~ > Microsoft MVP (Visual Basic) Paul,
Do you know a better way to transform a DataSet into Access database? Currently, I am creating table (create table..) and then inserting rows (insert into..) in the access database for each DataTable in that DataSet. It works fine but damn slow. Some of the tables have around 10,000 rows. Any idea, how to improve the performance? Regards Sanjib Show quote "Sanjib Biswas" <sanjib.bis***@ieee.org> wrote in message news:u0MFPXF5FHA.2864@tk2msftngp13.phx.gbl... > Hi Paul, > > Thanks a lot for the tips.. > > Regards > Sanjib > > "Paul Clement" <UseAdddressAtEndofMess***@swspectrum.com> wrote in message > news:62tum1dlfvamna3sfm6framju0k6hmbued@4ax.com... >> On Sun, 6 Nov 2005 15:54:26 +1100, "Sanjib Biswas" >> <sanjib.bis***@ieee.org> wrote: >> >> ¤ Hi, >> ¤ >> ¤ I am writing a software using VB.Net 2005 to convert MS Access and >> ¤ Dbase IV database to XML and vise versa. So far, I have got everything >> ¤ working except, I couldn't find any example of creating an empty Dbase >> IV >> ¤ database at runtime. I would appreciate if any one here could give me a >> lead >> ¤ on this. >> >> You can use the Jet OLEDB/dBase ISAM driver combination and Jet SQL. Just >> keep in mind that dBase >> won't support all Jet SQL: >> >> Dim dBaseConnection As New >> System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _ >> "Data >> Source=" & "e:\My >> Documents\dBase" & ";" & _ >> >> "Extended Properties=dBase IV") >> >> dBaseConnection.Open() >> >> 'New table >> Dim SQLCreateCommand As String >> SQLCreateCommand = "CREATE TABLE Customer " & _ >> "(CustomerID INTEGER," & _ >> "LastName TEXT(50), " & _ >> "FirstName TEXT(50)," & _ >> "Phone TEXT(10)," & _ >> "Email TEXT(50))" >> >> Dim dBaseCommand As New >> System.Data.OleDb.OleDbCommand(SQLCreateCommand, dBaseConnection) >> >> dBaseCommand.ExecuteNonQuery() >> dBaseConnection.Close() >> >> >> Paul >> ~~~~ >> Microsoft MVP (Visual Basic) > > On Wed, 9 Nov 2005 13:15:28 +1100, "Sanjib Biswas" <sanjib.bis***@ieee.org> wrote: ¤ Paul,¤ ¤ Do you know a better way to transform a DataSet into Access database? ¤ Currently, I am creating table (create table..) and then inserting rows ¤ (insert into..) in the access database for each DataTable in that DataSet. ¤ It works fine but damn slow. Some of the tables have around 10,000 rows. ¤ ¤ Any idea, how to improve the performance? ¤ Unfortunately, no I don't know of a better way. That is unless you can transfer the data directly from the other data source, rather than using a DataSet. Paul ~~~~ Microsoft MVP (Visual Basic) |
|||||||||||||||||||||||