From: Faby on

"Faby" <fabian_info(a)rediffmail.com> wrote in message news:...
> Hi,
>
> How to export Access Table to MySQL database using C# program?
> Code writtem by me given below. It gives error at the last line.
>
>
> Microsoft.Office.Interop.Access.Application oAccess = new
> Microsoft.Office.Interop.Access.Application();
>
> oAccess = new Microsoft.Office.Interop.Access.ApplicationClass();
>
> oAccess.OpenCurrentDatabase("E:\\RateFormat\\lergdata.mdb", true, null);
>
> oAccess.DoCmd.TransferDatabase(Microsoft.Office.Interop.Access.AcDataTransferType.acLink,
> "ODBC Database", "ODBC;Driver={MySQL ODBC 5.1
> Driver};Server=faby-pc;Database=crossgrid_v1;User=root;
> Password=faby;Option=3;",
> Microsoft.Office.Interop.Access.AcObjectType.acTable, "Lerg10",
> "Lerg10",false , false);
>
>
> Last line gives the following error:
> System.Runtime.InteropServices.COMException was unhandled by user code
> HelpLink="JETERR40.CHM#5003146"
> Message="ODBC--call failed."
> Source=""
> ErrorCode=-2146825142
>
> Can you please help me..
>
> Thanks in advance.
>
> Faby

From: Faby on

"Faby" <fabian_info(a)rediffmail.com> wrote in message news:...
> Hi,
>
> How to export Access Table to MySQL database using C# program?
> Code writtem by me given below. It gives error at the last line.
>
>
> Microsoft.Office.Interop.Access.Application oAccess = new
> Microsoft.Office.Interop.Access.Application();
>
> oAccess = new Microsoft.Office.Interop.Access.ApplicationClass();
>
> oAccess.OpenCurrentDatabase("E:\\RateFormat\\lergdata.mdb", true, null);
>
> oAccess.DoCmd.TransferDatabase(Microsoft.Office.Interop.Access.AcDataTransferType.acLink,
> "ODBC Database", "ODBC;Driver={MySQL ODBC 5.1
> Driver};Server=faby-pc;Database=crossgrid_v1;User=root;
> Password=faby;Option=3;",
> Microsoft.Office.Interop.Access.AcObjectType.acTable, "Lerg10",
> "Lerg10",false , false);
>
>
> Last line gives the following error:
> System.Runtime.InteropServices.COMException was unhandled by user code
> HelpLink="JETERR40.CHM#5003146"
> Message="ODBC--call failed."
> Source=""
> ErrorCode=-2146825142
>
> Can you please help me..
>
> Thanks in advance.
>
> Faby

 | 
Pages: 1
Prev: O ERRO 0X800CCC0D
Next: delacrjoh@yahoo.com