Pra4444
asked on
visual c# dataset to a DBF file
Does anybody know how to convert a dataset from .net to a .DBF file so that it can be accessed later by say a foxpro?? I couldnt find any examples online and all i could find was converting in into a binary...
I am using visual C#. however i am ok with a vb.net example as well , if somebody has done that..
Thanks.
I am using visual C#. however i am ok with a vb.net example as well , if somebody has done that..
Thanks.
With oledb just use the OleDbDataAdapter.Fill (DataTable) method. If the table does not exist in the access database, it will create it. Similarly you could use DataSet instead of DataTable, but you may not want to do a full DataSet.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes I think you are right priest04. I searched everywhere and i think i am going to follow the 2nd method..i have downloaded the oledb provider for foxpro..and was able to construct a simple sql ddl and get what i want..thanks a lot...i was kind of hoping someone might have done that before, but apparently no one did or atleast no one posted an example online...
I am glad I could help.
Goran
Goran
Then you can create a new access database by (you will just need to translate into c#):
Dim Access As New Microsoft.Office.Interop.A
Access.NewCurrentDatabase(
Access.Quit()
After this you can just use your usual oledb data connections or whatever form you would normal use to connect to an access database.