EDN Admin
Well-known member
I have a problem in VB .net finding this information so I nee d some help and some code.
I have not started the export but did try to get the import to work and so far no luck.
I want to import a Visual Fox Pro DBF file into an MDB.
I am using VisualBasic .Net 2005
So far No LUCK.
Here is a code snipet of what I am trying to do. I hooked up to Access via the <font size=2>Microsoft.Office.Interop </font>then I wanted to import the DBF via the Access transfer command option. <font size=2>
MAccessApp = </font><font color="#0000ff" size=2>New</font><font size=2> Microsoft.Office.Interop.Access.Application</font>
<font size=2>MAccessApp.OpenCurrentDatabase(DestMDB.Text)
MAccessApp.DoCmd.TransferDatabase(Microsoft.Office.Interop.Access.AcDataTransferType.acImport, </font><font color="#a31515" size=2>"ODBC"</font><font size=2>, </font><font color="#a31515" size=2>"ODBC;DSN=Visual FoxPro Tables;SourceDB="</font><font size=2> & SrcPath & </font><font color="#a31515" size=2>";SourceType=DBF;exclusive=No;backgroundfetch=Yes;collate=Machine;null=Yes;Deleted=Yes"</font><font size=2>, Microsoft.Office.Interop.Access.AcDataObjectType.acDataTable, "C:TEMPCrossTabe.dbf", "CrossTab")</font>
<font size=2>MAccessApp.CloseCurrentDatabase()</font>
<font size=2>All I get when I execute the TransferDatabase is </font>
<font size=2>The Microsoft Jet database engine could not find the object CrossTab. </font>
<font size=2>Make sure the object exists and that you spell its name and the path name correctly.</font>
<font size=2>Any ideas as to what I am suppossed to put in as the last item?</font>
<font size=2>Thanks, </font>
<font size=2>Bob</font>
View the full article
I have not started the export but did try to get the import to work and so far no luck.
I want to import a Visual Fox Pro DBF file into an MDB.
I am using VisualBasic .Net 2005
So far No LUCK.
Here is a code snipet of what I am trying to do. I hooked up to Access via the <font size=2>Microsoft.Office.Interop </font>then I wanted to import the DBF via the Access transfer command option. <font size=2>
MAccessApp = </font><font color="#0000ff" size=2>New</font><font size=2> Microsoft.Office.Interop.Access.Application</font>
<font size=2>MAccessApp.OpenCurrentDatabase(DestMDB.Text)
MAccessApp.DoCmd.TransferDatabase(Microsoft.Office.Interop.Access.AcDataTransferType.acImport, </font><font color="#a31515" size=2>"ODBC"</font><font size=2>, </font><font color="#a31515" size=2>"ODBC;DSN=Visual FoxPro Tables;SourceDB="</font><font size=2> & SrcPath & </font><font color="#a31515" size=2>";SourceType=DBF;exclusive=No;backgroundfetch=Yes;collate=Machine;null=Yes;Deleted=Yes"</font><font size=2>, Microsoft.Office.Interop.Access.AcDataObjectType.acDataTable, "C:TEMPCrossTabe.dbf", "CrossTab")</font>
<font size=2>MAccessApp.CloseCurrentDatabase()</font>
<font size=2>All I get when I execute the TransferDatabase is </font>
<font size=2>The Microsoft Jet database engine could not find the object CrossTab. </font>
<font size=2>Make sure the object exists and that you spell its name and the path name correctly.</font>
<font size=2>Any ideas as to what I am suppossed to put in as the last item?</font>
<font size=2>Thanks, </font>
<font size=2>Bob</font>
View the full article