What exception are you getting?

In other words, what is the value of ex.message?

On 9/13/05, urmila nalla <[EMAIL PROTECTED]> wrote:
> 
> 
> see the following code where i am trying to connect to access 
> database...at the end i am not able to open the conncetion which i can 
> identify through the statement
> 
> label1.text=cn.state ...i wrote this code in page load when i am running 
> this code i am getting label1.text as 0...
> 
> waiting for reply..
> 
> 
> 
> Dim strconn As String
> 
> strconn = "provider=microsoft.jet.oledb.4.0;datasource=f:\db2.mdb"
> 
> Dim cn As OleDb.OleDbConnection
> 
> cn = New OleDb.OleDbConnection
> 
> cn.ConnectionString = strconn
> 
> Try
> 
> cn.Open()
> 
> Catch ex As Exception
> 
> Console.WriteLine("Attempt to connect failed!" & vbCrLf & ex.Message)
> 
> finally
> 
> Label1.Text = cn.State
> 
> End Try
> 
> bye
> 
> urmila.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 


-- 
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to