473,320 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Potential bug?

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
6 1338
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: R.Gill | last post by:
We are researching the business potential of providing PHP/MySQL consulting services. Can anybody here have an idea of any published market forecast report giving the approximate Market size ( in...
27
by: Mark | last post by:
I'm curious to get feedback regarding the potential SVG has in performing the same functionality as PDF for fixing documents. Thanks. Mark
11
by: jbruno4000 | last post by:
I want to develop a C++ portfolio containing applications that will hopefully impress potential employers for Entry Level C++ jobs. I'm hoping some of you more experienced types might provide...
8
by: vidya.bhagwath | last post by:
Hello Experts, I am using std::string object as a member variable in one of the my class. The same class member function operates on the std::string object and it appends some string to that...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.