I am getting the same error with vb.net. I am using Sybase
SQL Anywhere, so I do not have the luxury of using OLEDB
Data Proivider.
Is it because the ODBC.NET did not get installed properly
or do we require MDAC2.6 instead of MDAC2.7RTM?
Any answers?
>-----Original Message-----
>If I call the function as:
>..
>..
> ODBC();
>..
>..
>private void ODBC()
>{
> try
> {
> string strCon = "dsn=oracle;UID=bsc;PWD=bsc;";
> OdbcConnection con = new OdbcConnection
(strCon); // Error.
> } catch (Exception ex)
> {
> MessageBox.Show(ex.Message);
> }
>}
>
>
>I get: "An unhandled exception of
type 'System.IO.FileNotFoundException'
>occurred in ADO01.exe" at
>the call "ODBC();". The function is never entered.
>
>
>If I place the code inline I get: "An unhandled exception
of type
>'System.IO.FileNotFoundException' occurred in
system.windows.forms.dll"
>at:
>
> static void Main()
> {
> Application.Run(new Form1());
> } <--- ERROR
>
>
>I can use System.Data.OleDb with Oracle and
Data.SqlClient with MS SQL
>Server.
>But the error generates when accessing
Microsoft.Data.Odbc. I am using the
>same connect string.
>
>
>Thanks.
>
>
>
>.
>