[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

System.IO.FileNotFoundException in ODBC.NET

babu

3/9/2002 2:28:00 AM

I am getting the unhandled exception of
type 'System.IO.FileNotFoundException' occurred in
system.windows.forms.dll while using ODBC.NET.

Following is the source code:

Imports System.Data
Imports Microsoft.Data.ODBC
Public Class OdbcDb
Inherits System.Windows.Forms.Form

...


Private Sub btnGetData_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnGetData.Click
Dim cn As Microsoft.Data.Odbc.OdbcConnection
Try

cn = New Microsoft.Data.Odbc.OdbcConnection()
cn.ConnectionString = "DSN=MyDsn;"
cn.Open()

Catch ex As Exception
MsgBox(ex.Message)
Catch ex As FileNotFoundException
MsgBox(ex.Message)
Finally
cn.Close()
End Try
End Sub
End Class

I think I downloaded and installed the necessary files
properly. I want to double check.
Is there a checklist to use ODBC.NET?
Does Someone have the answers?


2 Answers

Bob Beauchemin

3/9/2002 4:06:00 AM

0

It sounds like you are using a version of ODBC.NET that does not match the
version of the .NET framework you are using. If you are using beta2 of the
.NET framework, you must upgrade to the RTM version.

Bob Beauchemin
bobb@develop.com


"babu" <hbabu@autotown.com> wrote in message
news:0d3301c1c709$baa1bf00$36ef2ecf@tkmsftngxa12...
> I am getting the unhandled exception of
> type 'System.IO.FileNotFoundException' occurred in
> system.windows.forms.dll while using ODBC.NET.
>
> Following is the source code:
>
> Imports System.Data
> Imports Microsoft.Data.ODBC
> Public Class OdbcDb
> Inherits System.Windows.Forms.Form
>
> ...
>
>
> Private Sub btnGetData_Click(ByVal sender As
> System.Object, ByVal e As System.EventArgs) Handles
> btnGetData.Click
> Dim cn As Microsoft.Data.Odbc.OdbcConnection
> Try
>
> cn = New Microsoft.Data.Odbc.OdbcConnection()
> cn.ConnectionString = "DSN=MyDsn;"
> cn.Open()
>
> Catch ex As Exception
> MsgBox(ex.Message)
> Catch ex As FileNotFoundException
> MsgBox(ex.Message)
> Finally
> cn.Close()
> End Try
> End Sub
> End Class
>
> I think I downloaded and installed the necessary files
> properly. I want to double check.
> Is there a checklist to use ODBC.NET?
> Does Someone have the answers?
>
>


babu

4/2/2002 12:43:00 AM

0

When we got the actual release of VS.Net, installed it and
ODBC.NET and now I am able to successfully connect to
Adaptive Server Anywhere 6.0 (Sybase), but I am still not
able to connect to Sybase SQL Anywhere 5.0.

-thanks.
>-----Original Message-----
>It sounds like you are using a version of ODBC.NET that
does not match the
>version of the .NET framework you are using. If you are
using beta2 of the
>..NET framework, you must upgrade to the RTM version.
>
>Bob Beauchemin
>bobb@develop.com
>
>
>"babu" <hbabu@autotown.com> wrote in message
>news:0d3301c1c709$baa1bf00$36ef2ecf@tkmsftngxa12...
>> I am getting the unhandled exception of
>> type 'System.IO.FileNotFoundException' occurred in
>> system.windows.forms.dll while using ODBC.NET.
>>
>> Following is the source code:
>>
>> Imports System.Data
>> Imports Microsoft.Data.ODBC
>> Public Class OdbcDb
>> Inherits System.Windows.Forms.Form
>>
>> ...
>>
>>
>> Private Sub btnGetData_Click(ByVal sender As
>> System.Object, ByVal e As System.EventArgs) Handles
>> btnGetData.Click
>> Dim cn As Microsoft.Data.Odbc.OdbcConnection
>> Try
>>
>> cn = New Microsoft.Data.Odbc.OdbcConnection
()
>> cn.ConnectionString = "DSN=MyDsn;"
>> cn.Open()
>>
>> Catch ex As Exception
>> MsgBox(ex.Message)
>> Catch ex As FileNotFoundException
>> MsgBox(ex.Message)
>> Finally
>> cn.Close()
>> End Try
>> End Sub
>> End Class
>>
>> I think I downloaded and installed the necessary files
>> properly. I want to double check.
>> Is there a checklist to use ODBC.NET?
>> Does Someone have the answers?
>>
>>
>
>
>.
>