PC Review


Reply
Thread Tools Rate Thread

Assigning null to OleDb.OleDbConnection

 
 
John
Guest
Posts: n/a
 
      6th Aug 2007
Hi

How can I assign a null value to a variable of type OleDb.OleDbConnection?

Thanks

Regards


 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      6th Aug 2007
"John" <(E-Mail Removed)> schrieb
>
> How can I assign a null value to a variable of type
> OleDb.OleDbConnection?


dim con as OleDb.OleDbConnection

'...
con = Nothing

That's it?


Armin
 
Reply With Quote
 
rowe_newsgroups
Guest
Posts: n/a
 
      6th Aug 2007
On Aug 5, 9:55 pm, "John" <J...@nospam.infovis.co.uk> wrote:
> Hi
>
> How can I assign a null value to a variable of type OleDb.OleDbConnection?
>
> Thanks
>
> Regards


C#'s "null" should be replaced with "Nothing" in Visual Basic.

But if you concerned with terminating the connection you should really
call connection.Close() or connection.Dispose() or just wrap the
connection object in a using block

Thanks,

Seth Rowe

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning null to OleDb.OleDbConnection John Microsoft VB .NET 2 6th Aug 2007 11:40 AM
Null Values when exporting Excel to CSV using OLEDB =?Utf-8?B?Z2Vub2pvZQ==?= Microsoft VB .NET 0 16th Aug 2006 07:47 PM
Oledb, Datasets And Null Rows Jumping Matt Flash Microsoft VB .NET 1 21st Jul 2005 10:58 AM
Oledb, Datasets And Null Rows Jumping Matt Flash Microsoft VB .NET 0 21st Jul 2005 10:46 AM
Web Application using System.Data.oledb.OleDbConnection =?Utf-8?B?Tm92aWNl?= Microsoft ADO .NET 2 9th Jun 2004 06:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:01 PM.