By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,669 Members | 2,203 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,669 IT Pros & Developers. It's quick & easy.

Potential bug?

P: n/a
Hi,

Can somebody try this? Make a new .NET class library with one class.
Create a method that simply instantiates an instance of ADODB.Connection.
You will need to reference the ADODB assembly under .NET tab. Build the
project. Now make a vbscript file that creates an object of the class you
have just built. Then call the public method (which will attempt to
instantiate the ADODB.connection). If you have added a strong key and
registered the type library, and placed the assembly in the global assembly
cache all works fine. However, try moving the assembly to a computer without
visual studio (with a setup project) and see how you go.

I get a "File or Assembly name ADODB, or one of its dependencies was not
found". How bout you?
Jesse
Jul 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
install MDAC on the target computer

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
Hi,

Can somebody try this? Make a new .NET class library with one class.
Create a method that simply instantiates an instance of ADODB.Connection.
You will need to reference the ADODB assembly under .NET tab. Build the
project. Now make a vbscript file that creates an object of the class you
have just built. Then call the public method (which will attempt to
instantiate the ADODB.connection). If you have added a strong key and
registered the type library, and placed the assembly in the global assembly cache all works fine. However, try moving the assembly to a computer without visual studio (with a setup project) and see how you go.

I get a "File or Assembly name ADODB, or one of its dependencies was not
found". How bout you?
Jesse

Jul 21 '05 #2

P: n/a
Hi Nick,

I have. First 2.6, 2.6 and now 2.8.

Did you try it and if so did it work?

Jesse

"Nick Malik [Microsoft]" wrote:
install MDAC on the target computer

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
Hi,

Can somebody try this? Make a new .NET class library with one class.
Create a method that simply instantiates an instance of ADODB.Connection.
You will need to reference the ADODB assembly under .NET tab. Build the
project. Now make a vbscript file that creates an object of the class you
have just built. Then call the public method (which will attempt to
instantiate the ADODB.connection). If you have added a strong key and
registered the type library, and placed the assembly in the global

assembly
cache all works fine. However, try moving the assembly to a computer

without
visual studio (with a setup project) and see how you go.

I get a "File or Assembly name ADODB, or one of its dependencies was not
found". How bout you?
Jesse


Jul 21 '05 #3

P: n/a
I've directly coded, or supervised, two dozen different projects that use
database connectivity. Never had the error you are discussing.

Tell me about the systems that you are using. What is the configuration of
your dev machine? your target machine?

(Especially your target machine: do you have any service packs installed?
Were there errors when installing the framework?)

Have you taking your target app and installed it anywhere else? If so, does
it fail there? If so, describe the config of that machine as well.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
Hi Nick,

I have. First 2.6, 2.6 and now 2.8.

Did you try it and if so did it work?

Jesse

"Nick Malik [Microsoft]" wrote:
install MDAC on the target computer

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
Hi,

Can somebody try this? Make a new .NET class library with one class.
Create a method that simply instantiates an instance of ADODB.Connection. You will need to reference the ADODB assembly under .NET tab. Build the project. Now make a vbscript file that creates an object of the class you have just built. Then call the public method (which will attempt to
instantiate the ADODB.connection). If you have added a strong key and
registered the type library, and placed the assembly in the global

assembly
cache all works fine. However, try moving the assembly to a computer

without
visual studio (with a setup project) and see how you go.

I get a "File or Assembly name ADODB, or one of its dependencies was not found". How bout you?
Jesse


Jul 21 '05 #4

P: n/a
The development machine has VS.NET 2003. It is running Windows 2000 with
SP4. I have MDAC 7.1 on it. The target machine is a Windows 2000 Server
with SP4 also. This originally had MDAC 2.6, so I tried it with 2.7 and now
2.8 - No luck. There were no problems installing the .NET Redistributable
Package on it. I have also got my brother to try it on his Windows XP Pro
machine which was a new installation so was likely to have any recent service
packs. In addition to installing the .NET framework on his computer, I got
him to install the SDK from the microsoft website - no go. On both target
machines, it is fine if the class is being called by a .NET app but not when
being called from VBscript with something like:

Dim conn
Set conn = CreateObject("MyAssembly.MyClass")
conn.method

It actually fails on the third line, indicating that object is created but
when the method is called the ADODB.Connection object cannot be instantiated.

I urge you to try one more time, I think you will be surprised to find that
it will not work. Obviously, it CAN work, as it does on the development
machine.

By the way,
Thanks for taking an interest.
and
Merry Christmas

"Nick Malik [Microsoft]" wrote:
I've directly coded, or supervised, two dozen different projects that use
database connectivity. Never had the error you are discussing.

Tell me about the systems that you are using. What is the configuration of
your dev machine? your target machine?

(Especially your target machine: do you have any service packs installed?
Were there errors when installing the framework?)

Have you taking your target app and installed it anywhere else? If so, does
it fail there? If so, describe the config of that machine as well.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
Hi Nick,

I have. First 2.6, 2.6 and now 2.8.

Did you try it and if so did it work?

Jesse

"Nick Malik [Microsoft]" wrote:
install MDAC on the target computer

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
> Hi,
>
> Can somebody try this? Make a new .NET class library with one class.
> Create a method that simply instantiates an instance of ADODB.Connection. > You will need to reference the ADODB assembly under .NET tab. Build the > project. Now make a vbscript file that creates an object of the class you > have just built. Then call the public method (which will attempt to
> instantiate the ADODB.connection). If you have added a strong key and
> registered the type library, and placed the assembly in the global
assembly
> cache all works fine. However, try moving the assembly to a computer
without
> visual studio (with a setup project) and see how you go.
>
> I get a "File or Assembly name ADODB, or one of its dependencies was not > found". How bout you?
> Jesse


Jul 21 '05 #5

P: n/a
OK. I got more info that time. I think I get the idea.

You are running your object from Windows Script Host, right?

What version of WSH are you running on the target environment?
[Normally, WSH 2.0 ships on Win2K. The current version is WSH 5.6. You can
download the newest version from:
http://msdn.microsoft.com/scripting ]

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
The development machine has VS.NET 2003. It is running Windows 2000 with
SP4. I have MDAC 7.1 on it. The target machine is a Windows 2000 Server
with SP4 also. This originally had MDAC 2.6, so I tried it with 2.7 and now 2.8 - No luck. There were no problems installing the .NET Redistributable
Package on it. I have also got my brother to try it on his Windows XP Pro
machine which was a new installation so was likely to have any recent service packs. In addition to installing the .NET framework on his computer, I got him to install the SDK from the microsoft website - no go. On both target
machines, it is fine if the class is being called by a .NET app but not when being called from VBscript with something like:

Dim conn
Set conn = CreateObject("MyAssembly.MyClass")
conn.method

It actually fails on the third line, indicating that object is created but
when the method is called the ADODB.Connection object cannot be instantiated.
I urge you to try one more time, I think you will be surprised to find that it will not work. Obviously, it CAN work, as it does on the development
machine.

By the way,
Thanks for taking an interest.
and
Merry Christmas

"Nick Malik [Microsoft]" wrote:
I've directly coded, or supervised, two dozen different projects that use database connectivity. Never had the error you are discussing.

Tell me about the systems that you are using. What is the configuration of your dev machine? your target machine?

(Especially your target machine: do you have any service packs installed? Were there errors when installing the framework?)

Have you taking your target app and installed it anywhere else? If so, does it fail there? If so, describe the config of that machine as well.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
Hi Nick,

I have. First 2.6, 2.6 and now 2.8.

Did you try it and if so did it work?

Jesse

"Nick Malik [Microsoft]" wrote:

> install MDAC on the target computer
>
> --
> --- Nick Malik [Microsoft]
> MCSD, CFPS, Certified Scrummaster
> http://blogs.msdn.com/nickmalik
>
> Disclaimer: Opinions expressed in this forum are my own, and not
> representative of my employer.
> I do not answer questions on behalf of my employer. I'm just a
> programmer helping programmers.
> --
> "Jessard" <Je*****@discussions.microsoft.com> wrote in message
> news:77**********************************@microsof t.com...
> > Hi,
> >
> > Can somebody try this? Make a new .NET class library with one class. > > Create a method that simply instantiates an instance of

ADODB.Connection.
> > You will need to reference the ADODB assembly under .NET tab. Build
the
> > project. Now make a vbscript file that creates an object of the
class you
> > have just built. Then call the public method (which will attempt
to > > instantiate the ADODB.connection). If you have added a strong key and > > registered the type library, and placed the assembly in the global
> assembly
> > cache all works fine. However, try moving the assembly to a computer > without
> > visual studio (with a setup project) and see how you go.
> >
> > I get a "File or Assembly name ADODB, or one of its dependencies

was not
> > found". How bout you?
> > Jesse
>
>
>


Jul 21 '05 #6

P: n/a
Yes, I beleive vbscript uses Windows Script Host, however I'm not 100% sure.
I installed the update for this as you suggested on my brothers XP machine
and also service pack 2. Still the same error.

Any other ideas?
"Nick Malik [Microsoft]" wrote:
OK. I got more info that time. I think I get the idea.

You are running your object from Windows Script Host, right?

What version of WSH are you running on the target environment?
[Normally, WSH 2.0 ships on Win2K. The current version is WSH 5.6. You can
download the newest version from:
http://msdn.microsoft.com/scripting ]

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
The development machine has VS.NET 2003. It is running Windows 2000 with
SP4. I have MDAC 7.1 on it. The target machine is a Windows 2000 Server
with SP4 also. This originally had MDAC 2.6, so I tried it with 2.7 and

now
2.8 - No luck. There were no problems installing the .NET Redistributable
Package on it. I have also got my brother to try it on his Windows XP Pro
machine which was a new installation so was likely to have any recent

service
packs. In addition to installing the .NET framework on his computer, I

got
him to install the SDK from the microsoft website - no go. On both target
machines, it is fine if the class is being called by a .NET app but not

when
being called from VBscript with something like:

Dim conn
Set conn = CreateObject("MyAssembly.MyClass")
conn.method

It actually fails on the third line, indicating that object is created but
when the method is called the ADODB.Connection object cannot be

instantiated.

I urge you to try one more time, I think you will be surprised to find

that
it will not work. Obviously, it CAN work, as it does on the development
machine.

By the way,
Thanks for taking an interest.
and
Merry Christmas

"Nick Malik [Microsoft]" wrote:
I've directly coded, or supervised, two dozen different projects that use database connectivity. Never had the error you are discussing.

Tell me about the systems that you are using. What is the configuration of your dev machine? your target machine?

(Especially your target machine: do you have any service packs installed? Were there errors when installing the framework?)

Have you taking your target app and installed it anywhere else? If so, does it fail there? If so, describe the config of that machine as well.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jessard" <Je*****@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
> Hi Nick,
>
> I have. First 2.6, 2.6 and now 2.8.
>
> Did you try it and if so did it work?
>
> Jesse
>
> "Nick Malik [Microsoft]" wrote:
>
> > install MDAC on the target computer
> >
> > --
> > --- Nick Malik [Microsoft]
> > MCSD, CFPS, Certified Scrummaster
> > http://blogs.msdn.com/nickmalik
> >
> > Disclaimer: Opinions expressed in this forum are my own, and not
> > representative of my employer.
> > I do not answer questions on behalf of my employer. I'm just a
> > programmer helping programmers.
> > --
> > "Jessard" <Je*****@discussions.microsoft.com> wrote in message
> > news:77**********************************@microsof t.com...
> > > Hi,
> > >
> > > Can somebody try this? Make a new .NET class library with one class. > > > Create a method that simply instantiates an instance of
ADODB.Connection.
> > > You will need to reference the ADODB assembly under .NET tab. Build the
> > > project. Now make a vbscript file that creates an object of the class you
> > > have just built. Then call the public method (which will attempt to > > > instantiate the ADODB.connection). If you have added a strong key and > > > registered the type library, and placed the assembly in the global
> > assembly
> > > cache all works fine. However, try moving the assembly to a computer > > without
> > > visual studio (with a setup project) and see how you go.
> > >
> > > I get a "File or Assembly name ADODB, or one of its dependencies was not
> > > found". How bout you?
> > > Jesse
> >
> >
> >


Jul 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.