Home All Groups Group Topic Archive Search About

Dim DBh as new DBhandler vb.net 2.0 question

Author
15 Aug 2006 7:00 AM
Bonzol
I am trying to bring code over from 2003,
I am trying to do the following involving the following file
DBhandler.vb

Dim DBH as new DBhandler
DBH = new DBHhandler

works in 1.1, but not in 2.0

Any thoughts?

Author
15 Aug 2006 7:50 AM
Cor Ligthert [MVP]
Bonzol,

Are you sure that you have set the reference as well in the 2005 version?
Assuming that this is a seperate dll.

Cor

Show quoteHide quote
"Bonzol" <Bon***@hotmail.com> schreef in bericht
news:1155625204.626814.169300@m73g2000cwd.googlegroups.com...
>I am trying to bring code over from 2003,
> I am trying to do the following involving the following file
> DBhandler.vb
>
> Dim DBH as new DBhandler
> DBH = new DBHhandler
>
> works in 1.1, but not in 2.0
>
> Any thoughts?
>
Author
15 Aug 2006 1:11 PM
Michel Posseth [MCP]
Hello Bonzol


this is possible 

Dim bla As New ClsFoo
        bla = New ClsFoo

however it should better be written as

Dim bla As ClsFoo
        bla = New ClsFoo

or just

Dim bla As New ClsFoo


Your construct works in my situation so i guess that you are missing the
class file in your project or there is an error in that class file


regards

Michel Posseth [MCP]





Show quoteHide quote
"Bonzol" wrote:

> I am trying to bring code over from 2003,
> I am trying to do the following involving the following file
> DBhandler.vb
>
> Dim DBH as new DBhandler
> DBH = new DBHhandler
>
> works in 1.1, but not in 2.0
>
> Any thoughts?
>
>
Author
16 Aug 2006 4:15 PM
Chris Dunaway
> I am trying to bring code over from 2003,
> I am trying to do the following involving the following file
> DBhandler.vb
>
> Dim DBH as new DBhandler
> DBH = new DBHhandler
>
> works in 1.1, but not in 2.0
>

You need to provide more information.  What do you mean when you say it
doesn't work in 2.0?  Are you getting an error of some sort?  Does it
compile?  Is the error only at runtime?