473,387 Members | 1,545 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,387 software developers and data experts.

Enterprise Library DAAB via COM

I have a .net 2005 class library project that relies upon the Data Access
Application Block from the 2006 Enterprise Library.

I want to call my project from a legacy VB6 application.

Simple calls from the VB6 project to the .net project work fine but any call
to a method that replies upon the DAAB fails with the message “The type
initializer for
'Microsoft.Practices.EnterpriseLibrary.Data.Databa seConfigurationView' threw
an exception.”

Please help me understand what is causing this. Thanks.

Oct 20 '06 #1
5 1313
Hi,

Could you let me know how you exported your project to VB6? Did you used
type library exporter(Tlbexp.exe)?

Was the exception thrown on the dev machine or a client's machine? Was the
.NET framework and the Enterprise Library successfully installed on that
machine? Did you see the assemblies for DAAB appear in the GAC?

Please also let me know what type of exception did you get, so we can see
what is prevent the call from success. Thank you!

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 23 '06 #2
I checked the "Register for COM interop" checkbox.

Both client and server are running on my development machine. DAAB working
correclty in all other cases.

If I change the code on the server so it doesn't use DAAB then all works fine.

i.e.

This works:

Dim _cnn As New SqlConnection("Database=MIB;Server=(local);Integra ted
Security=SSPI;")
_cnn.Open()
Try
Dim _cmd As New SqlCommand(m_StoredProcedureName, _cnn)
_cmd.CommandType = CommandType.StoredProcedure
_cmd.Parameters.Add(m_ParameterNameComputerName,
SqlDbType.Text).Value = ComputerName
_cmd.ExecuteNonQuery()
Finally
_cnn.Close()
End Try

This does not:

Dim _Database As Database = DatabaseFactory.CreateDatabase
With _Database
Dim _Cmd As SqlCommand =
..GetStoredProcCommand(m_StoredProcedureName)
.AddInParameter(_Cmd, m_ParameterNameComputerName,
DbType.String, ComputerName)
.ExecuteNonQuery(_Cmd)
End With

Thanks.

"Kevin Yu [MSFT]" wrote:
Hi,

Could you let me know how you exported your project to VB6? Did you used
type library exporter(Tlbexp.exe)?

Was the exception thrown on the dev machine or a client's machine? Was the
.NET framework and the Enterprise Library successfully installed on that
machine? Did you see the assemblies for DAAB appear in the GAC?

Please also let me know what type of exception did you get, so we can see
what is prevent the call from success. Thank you!

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 23 '06 #3
Hi,

Could you show me some more about the detailed information of the
exception? For example, the call stack and the detailed exception message
will be helpful. Or a screen shot is also good. I'm trying to see whether
this is a class library issue or interop issue.

By the way, is your class library single threaded or multiple threaded? As
VB6 only supports single threaded, any app attempt to use multiple threaded
will fail.

At mean time, please also check the following KB article

http://support.microsoft.com/kb/817248

It will be helpful. Thank you for your cooperation.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 24 '06 #4

Dick wrote:
I have a .net 2005 class library project that relies upon the Data Access
Application Block from the 2006 Enterprise Library.

I want to call my project from a legacy VB6 application.

Simple calls from the VB6 project to the .net project work fine but any call
to a method that replies upon the DAAB fails with the message "The type
initializer for
'Microsoft.Practices.EnterpriseLibrary.Data.Databa seConfigurationView' threw
an exception."

Please help me understand what is causing this. Thanks.
Nov 22 '06 #5
Hi ,
Has anybody found the solution to this problem.I am facing a very
similar problem.Could some one please help.
Thanks
Arun
Dick wrote:
I have a .net 2005 class library project that relies upon the Data Access
Application Block from the 2006 Enterprise Library.

I want to call my project from a legacy VB6 application.

Simple calls from the VB6 project to the .net project work fine but any call
to a method that replies upon the DAAB fails with the message "The type
initializer for
'Microsoft.Practices.EnterpriseLibrary.Data.Databa seConfigurationView' threw
an exception."

Please help me understand what is causing this. Thanks.
Nov 22 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike Chamberlain | last post by:
Hi all. I'm trying to extend the Microsoft Enterprise Library Data Access Application Block (http://msdn.microsoft.com/library/en-us/dnpag2/html/daab.asp?frame=true) to work with a Borland...
0
by: Vinny_Davis | last post by:
Hi - I installed Enterprise Library successfully. Under the DAAB area I am seeing two VS solution links. One says "Data" and another says "Data Design". What is the difference? Thanks, Vinny
2
by: David | last post by:
I have been developing applications with Java for quite a while but I am new to .NET development. I am trying to learn the ".NET way" of creating Strongly Typed Objects from a database. The...
3
by: veera sekhar kota | last post by:
hi, im seriously looking for right answer .... We are developing windows application in c#. I implemented DAAB(Data Access Application Block) 2.0 in our application. One of the senior asked...
0
by: veera sekhar kota | last post by:
im seriously looking for right answer .... We are developing windows application in c#. I implemented DAAB(Data Access Application Block) 2.0 in our application. One of the senior asked me to...
0
by: veera sekhar kota | last post by:
im seriously looking for right answer .... We are developing windows application in c#. I implemented DAAB(Data Access Application Block) 2.0 in our application. One of the senior asked me to...
3
by: craig | last post by:
I was just wondering if anyone else may have incorporated the original Microsoft Exception Management Application Block (EMAB) or Data Access Application Block (DAAB) into one of their applications...
7
by: rockdale | last post by:
hi, I just downloaded Microsoft Enterprise Library Jan 2006 and try to integrate it into my asp.net application. As i am going to connect to mySQL database, I need to include the source code in my...
4
by: Cirene | last post by:
I am using ASP.NET, .NET 3.5 FW and MySQL db. I was looking at the Enterprise Library Contrib Data Access Application Block....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.