473,320 Members | 1,950 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.

DAAB problem

Now I'm coming from a VB6 background so I may be overlooking something here.

I have functionality that is contained with 2 VB 2005 dll's.

WARC_Subs_Reporting.dll which handles report functions and has a reference
to WARC_Standard_Functions which holds the day to day functionality and has
references to Microsoft.Practices.EnterpriseLibrary.Data.dll and
Microsoft.Practices.EnterpriseLibrary.Common.dll

I want WARC_Subs_Reporting.dll available to MS Access 2003 and so have
assigned Strong Names to all of the above. I have created an install
routine for WARC_Subs_Reporting.dll which then has the other 3 named dll's
as references. The install when run installs all 4 dll's to the correct
directory. I then add WARC_Subs_Reporting.dll to the GAC as it is the only
dll I require to access from COM.

I've now created a dummy VB 2005 project to test the installed dll. When I
step through, it calls a procedure within WARC_Subs_Reporting.dll, which
calls a procedure within WARC_Standard_Functions that creates a dataset by
using the procedures within the DAAB. However, it always falls over on the
following line of code within the DAAB:

return EnterpriseLibraryFactory.BuildUp<T>(name, configurationSource);

within the 'public T Create(string name)' procedure within the
'NameTypeFactoryBase' class.

Giving this error:

The type initializer for
'Microsoft.Practices.EnterpriseLibrary.Common.Conf iguration.ObjectBuilder.EnterpriseLibraryFactory'
threw an exception.

Now, to be honest, I have no idea what this is and cannot find any useful
help on the matter. Any ideas.

Thanks

Chubbly
Jun 6 '06 #1
11 1655
Chubbly,

Have you tried to debug this? There should also be information in the
Message property of the exception. Also, be sure to check the
InnerException property. It looks like there is a static constructor for
the
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.EnterpriseLibraryFactory
class which is throwing an exception.

Also, a comment on your installation. While you might only be exposing
classes from one assembly in the GAC, you should have all of the references
that the assembly has in the GAC as well. It doesn't make sense to have
just the one assembly in the GAC and the others be private, when you know
that it will require those references.

The idea here is to distrubute those assemblies as a logical unit, which
you are currently breaking up.

Adding them to the GAC won't make them visible to COM, it will just
enforce that logical unit.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:OI**************@TK2MSFTNGP04.phx.gbl...
Now I'm coming from a VB6 background so I may be overlooking something
here.

I have functionality that is contained with 2 VB 2005 dll's.

WARC_Subs_Reporting.dll which handles report functions and has a reference
to WARC_Standard_Functions which holds the day to day functionality and
has references to Microsoft.Practices.EnterpriseLibrary.Data.dll and
Microsoft.Practices.EnterpriseLibrary.Common.dll

I want WARC_Subs_Reporting.dll available to MS Access 2003 and so have
assigned Strong Names to all of the above. I have created an install
routine for WARC_Subs_Reporting.dll which then has the other 3 named dll's
as references. The install when run installs all 4 dll's to the correct
directory. I then add WARC_Subs_Reporting.dll to the GAC as it is the
only dll I require to access from COM.

I've now created a dummy VB 2005 project to test the installed dll. When
I step through, it calls a procedure within WARC_Subs_Reporting.dll, which
calls a procedure within WARC_Standard_Functions that creates a dataset by
using the procedures within the DAAB. However, it always falls over on
the following line of code within the DAAB:

return EnterpriseLibraryFactory.BuildUp<T>(name, configurationSource);

within the 'public T Create(string name)' procedure within the
'NameTypeFactoryBase' class.

Giving this error:

The type initializer for
'Microsoft.Practices.EnterpriseLibrary.Common.Conf iguration.ObjectBuilder.EnterpriseLibraryFactory'
threw an exception.

Now, to be honest, I have no idea what this is and cannot find any useful
help on the matter. Any ideas.

Thanks

Chubbly

Jun 6 '06 #2

The enterprise library uses config information to build its connection
string.
Take a look here.

Your configuration information is probably off/wrong.

http://davidhayden.com/blog/dave/arc...1/08/2686.aspx


"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:OI**************@TK2MSFTNGP04.phx.gbl...
Now I'm coming from a VB6 background so I may be overlooking something here.
I have functionality that is contained with 2 VB 2005 dll's.

WARC_Subs_Reporting.dll which handles report functions and has a reference
to WARC_Standard_Functions which holds the day to day functionality and has references to Microsoft.Practices.EnterpriseLibrary.Data.dll and
Microsoft.Practices.EnterpriseLibrary.Common.dll

I want WARC_Subs_Reporting.dll available to MS Access 2003 and so have
assigned Strong Names to all of the above. I have created an install
routine for WARC_Subs_Reporting.dll which then has the other 3 named dll's
as references. The install when run installs all 4 dll's to the correct
directory. I then add WARC_Subs_Reporting.dll to the GAC as it is the only dll I require to access from COM.

I've now created a dummy VB 2005 project to test the installed dll. When I step through, it calls a procedure within WARC_Subs_Reporting.dll, which
calls a procedure within WARC_Standard_Functions that creates a dataset by
using the procedures within the DAAB. However, it always falls over on the following line of code within the DAAB:

return EnterpriseLibraryFactory.BuildUp<T>(name, configurationSource);

within the 'public T Create(string name)' procedure within the
'NameTypeFactoryBase' class.

Giving this error:

The type initializer for
'Microsoft.Practices.EnterpriseLibrary.Common.Conf iguration.ObjectBuilder.En
terpriseLibraryFactory' threw an exception.

Now, to be honest, I have no idea what this is and cannot find any useful
help on the matter. Any ideas.

Thanks

Chubbly

Jun 6 '06 #3
Nicolas

thanks for the quick response.

I am unable to find any info on the inner exception, but copying this error
to the clipboard produces the following:

System.TypeInitializationException was unhandled
Message="The type initializer for
'Microsoft.Practices.EnterpriseLibrary.Common.Conf iguration.ObjectBuilder.EnterpriseLibraryFactory'
threw an exception."
Source="Microsoft.Practices.EnterpriseLibrary.Comm on"
TypeName="Microsoft.Practices.EnterpriseLibrary.Co mmon.Configuration.ObjectBuilder.EnterpriseLibrary Factory"
StackTrace:
at
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.EnterpriseLibraryFactory.Bu ildUp[T](String
id, IConfigurationSource configurationSource)
at
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.NameTypeFactoryBase`1.Creat e(String
name)
at
Microsoft.Practices.EnterpriseLibrary.Data.Databas eFactory.CreateDatabase(String
name)
at SharedFunctions.clsConnection.CreateDataset(String strSQL, String
conn)
at WARC_Subs_Reporting.modRenewal.AgentsRenewalsCheck ()
at WARC_Subs_Reporting.clsPublic.AgentsRenewal()
at WindowsApplication3.Form1.Button1_Click(Object sender, EventArgs
e) in C:\temp\2005\WindowsApplication3\WindowsApplicatio n3\Form1.vb:line 8
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG&
msg)
at
System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationCo ntext context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[]
commandLine)
at WindowsApplication3.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

with which I am totally lost. I can see where the error is happening but
not too sure how to resolve.

Chubbly
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eo**************@TK2MSFTNGP03.phx.gbl...
Chubbly,

Have you tried to debug this? There should also be information in the
Message property of the exception. Also, be sure to check the
InnerException property. It looks like there is a static constructor for
the
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.EnterpriseLibraryFactory
class which is throwing an exception.

Also, a comment on your installation. While you might only be exposing
classes from one assembly in the GAC, you should have all of the
references that the assembly has in the GAC as well. It doesn't make
sense to have just the one assembly in the GAC and the others be private,
when you know that it will require those references.

The idea here is to distrubute those assemblies as a logical unit,
which you are currently breaking up.

Adding them to the GAC won't make them visible to COM, it will just
enforce that logical unit.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:OI**************@TK2MSFTNGP04.phx.gbl...
Now I'm coming from a VB6 background so I may be overlooking something
here.

I have functionality that is contained with 2 VB 2005 dll's.

WARC_Subs_Reporting.dll which handles report functions and has a
reference to WARC_Standard_Functions which holds the day to day
functionality and has references to
Microsoft.Practices.EnterpriseLibrary.Data.dll and
Microsoft.Practices.EnterpriseLibrary.Common.dll

I want WARC_Subs_Reporting.dll available to MS Access 2003 and so have
assigned Strong Names to all of the above. I have created an install
routine for WARC_Subs_Reporting.dll which then has the other 3 named
dll's as references. The install when run installs all 4 dll's to the
correct directory. I then add WARC_Subs_Reporting.dll to the GAC as it
is the only dll I require to access from COM.

I've now created a dummy VB 2005 project to test the installed dll. When
I step through, it calls a procedure within WARC_Subs_Reporting.dll,
which calls a procedure within WARC_Standard_Functions that creates a
dataset by using the procedures within the DAAB. However, it always
falls over on the following line of code within the DAAB:

return EnterpriseLibraryFactory.BuildUp<T>(name, configurationSource);

within the 'public T Create(string name)' procedure within the
'NameTypeFactoryBase' class.

Giving this error:

The type initializer for
'Microsoft.Practices.EnterpriseLibrary.Common.Conf iguration.ObjectBuilder.EnterpriseLibraryFactory'
threw an exception.

Now, to be honest, I have no idea what this is and cannot find any useful
help on the matter. Any ideas.

Thanks

Chubbly


Jun 6 '06 #4
It seems the inner exception is

System.IO.FileNotFoundException

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Nicolas

thanks for the quick response.

I am unable to find any info on the inner exception, but copying this
error to the clipboard produces the following:

System.TypeInitializationException was unhandled
Message="The type initializer for
'Microsoft.Practices.EnterpriseLibrary.Common.Conf iguration.ObjectBuilder.EnterpriseLibraryFactory'
threw an exception."
Source="Microsoft.Practices.EnterpriseLibrary.Comm on"

TypeName="Microsoft.Practices.EnterpriseLibrary.Co mmon.Configuration.ObjectBuilder.EnterpriseLibrary Factory"
StackTrace:
at
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.EnterpriseLibraryFactory.Bu ildUp[T](String
id, IConfigurationSource configurationSource)
at
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.NameTypeFactoryBase`1.Creat e(String
name)
at
Microsoft.Practices.EnterpriseLibrary.Data.Databas eFactory.CreateDatabase(String
name)
at SharedFunctions.clsConnection.CreateDataset(String strSQL, String
conn)
at WARC_Subs_Reporting.modRenewal.AgentsRenewalsCheck ()
at WARC_Subs_Reporting.clsPublic.AgentsRenewal()
at WindowsApplication3.Form1.Button1_Click(Object sender, EventArgs
e) in C:\temp\2005\WindowsApplication3\WindowsApplicatio n3\Form1.vb:line 8
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG&
msg)
at
System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationCo ntext context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[]
commandLine)
at WindowsApplication3.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

with which I am totally lost. I can see where the error is happening but
not too sure how to resolve.

Chubbly
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:eo**************@TK2MSFTNGP03.phx.gbl...
Chubbly,

Have you tried to debug this? There should also be information in the
Message property of the exception. Also, be sure to check the
InnerException property. It looks like there is a static constructor for
the
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.EnterpriseLibraryFactory
class which is throwing an exception.

Also, a comment on your installation. While you might only be
exposing classes from one assembly in the GAC, you should have all of the
references that the assembly has in the GAC as well. It doesn't make
sense to have just the one assembly in the GAC and the others be private,
when you know that it will require those references.

The idea here is to distrubute those assemblies as a logical unit,
which you are currently breaking up.

Adding them to the GAC won't make them visible to COM, it will just
enforce that logical unit.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:OI**************@TK2MSFTNGP04.phx.gbl...
Now I'm coming from a VB6 background so I may be overlooking something
here.

I have functionality that is contained with 2 VB 2005 dll's.

WARC_Subs_Reporting.dll which handles report functions and has a
reference to WARC_Standard_Functions which holds the day to day
functionality and has references to
Microsoft.Practices.EnterpriseLibrary.Data.dll and
Microsoft.Practices.EnterpriseLibrary.Common.dll

I want WARC_Subs_Reporting.dll available to MS Access 2003 and so have
assigned Strong Names to all of the above. I have created an install
routine for WARC_Subs_Reporting.dll which then has the other 3 named
dll's as references. The install when run installs all 4 dll's to the
correct directory. I then add WARC_Subs_Reporting.dll to the GAC as it
is the only dll I require to access from COM.

I've now created a dummy VB 2005 project to test the installed dll.
When I step through, it calls a procedure within
WARC_Subs_Reporting.dll, which calls a procedure within
WARC_Standard_Functions that creates a dataset by using the procedures
within the DAAB. However, it always falls over on the following line of
code within the DAAB:

return EnterpriseLibraryFactory.BuildUp<T>(name, configurationSource);

within the 'public T Create(string name)' procedure within the
'NameTypeFactoryBase' class.

Giving this error:

The type initializer for
'Microsoft.Practices.EnterpriseLibrary.Common.Conf iguration.ObjectBuilder.EnterpriseLibraryFactory'
threw an exception.

Now, to be honest, I have no idea what this is and cannot find any
useful help on the matter. Any ideas.

Thanks

Chubbly



Jun 7 '06 #5
Hi Kevin

It always falls over on the following line of code within
Microsoft.Practices.EnterpriseLibrary.Common.dll:

return EnterpriseLibraryFactory.BuildUp<T>(name, configurationSource);

within the 'public T Create(string name)' procedure within the
'NameTypeFactoryBase' class.

Giving this error:

The type initializer for
'Microsoft.Practices.EnterpriseLibrary.Common.Conf iguration.ObjectBuilder.EnterpriseLibraryFactory'
threw an exception.

The inner exception appears to be 'System.IO.FileNotFoundException'

Any help would be appreciated.

Chubbly

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:Gy**************@TK2MSFTNGXA01.phx.gbl...
Hi Chubbly,

If you step into the code, on which line was the exception thrown?

Kevin Yu
Microsoft Online Community Support

================================================== ==========================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ==========================
==========================

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

Jun 7 '06 #6
I appear to have tracked down what I think is the error.

"The requested database Subscriptions2_Test is not defined in configuration."

This is being thrown from within the 'DatabaseFactory.cs' class and the 'CreateDatabase' method.

Subscriptions2_Test is the name of the default connection within my app.config in my WARC_Standard_Functions.dll

Do I maybe need to create an app.config file for the DatabaseFactory ..?


"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message news:uh****************@TK2MSFTNGP02.phx.gbl...
Hi Kevin

It always falls over on the following line of code within
Microsoft.Practices.EnterpriseLibrary.Common.dll:

return EnterpriseLibraryFactory.BuildUp<T>(name, configurationSource);

within the 'public T Create(string name)' procedure within the
'NameTypeFactoryBase' class.

Giving this error:

The type initializer for
'Microsoft.Practices.EnterpriseLibrary.Common.Conf iguration.ObjectBuilder..EnterpriseLibraryFactory'
threw an exception.

The inner exception appears to be 'System.IO.FileNotFoundException'

Any help would be appreciated.

Chubbly



"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:Gy**************@TK2MSFTNGXA01.phx.gbl...
Hi Chubbly,

If you step into the code, on which line was the exception thrown?

Kevin Yu
Microsoft Online Community Support

================================================== ==========================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ==========================
==========================

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


Jun 7 '06 #7
I don't appear to be missing anything. I have reinstalled the Enterprise
Library in full.

My WARC_Subs_Reporting.dll references WARC_Shared_Functions.dll which in
turn references 2 enterprise library dll's. My setup project for
WARC_Subs_Reporting.dll shows the other 3 dll's as dependencies. Upon
install, all 4 dll's are copied to the correct directory as expected.

When I then run my test project which references WARC_Subs_Reporting.dll, I
can step through until I receive the error. This happens whether I add the
dll's to the GAC or not.
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:M%****************@TK2MSFTNGXA01.phx.gbl...
Hi Chubby,

Since the inner exception is a FileNotFoundException, could you please if
you're missing something? Are the assemblies you're referencing all exists
and registered successfully?

I agree with Nicholas that the assemblies referenced by assembly in GAC
should all be in GAC.

Kevin Yu
Microsoft Online Community Support

================================================== ==========================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ==========================
==========================

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

Jun 9 '06 #8
When I create a database I use the following procedure:

Public Class clsConnection

Function CreateDataset(ByVal strSQL As String, ByVal conn As String) As DataSet

Dim db As Database = DatabaseFactory.CreateDatabase(conn)

Dim sqlcommand As String = strSQL

Dim dbcommand As System.Data.Common.DbCommand = db.GetSqlStringCommand(sqlcommand)

Dim ds As DataSet = db.ExecuteDataSet(dbcommand)

Return ds

End Function

as you can see I am supplying an argument ('conn' in this case Subscriptions2_Test) for the 'DatabaseFactory.CreateDatabase'. It seems to me that the problem is here somewhere. The demo app supllied with Ent Lib does not use this argument.

I have an app.config file included as part of my dll which looks like this:

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.C onfiguration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" />

</configSections>

<connectionStrings>

<add name="WarcLog_Test" connectionString="server=WEBDEV;database=WARCLog;I ntegrated Security=true"

providerName="System.Data.SqlClient" />

<add name="Subscriptions2_Test" connectionString="server=WEBDEV;database=Subscript ions2;Integrated Security=true"

providerName="System.Data.SqlClient" />

<add name="WarcLog" connectionString="server=WARC;database=WARCLog;Int egrated Security=true"

providerName="System.Data.SqlClient" />

<add name="Subscriptions" connectionString="server=ACC_SQL2K;database=Subscr iptions;Integrated Security=true"

providerName="System.Data.SqlClient" />

</connectionStrings>

<dataConfiguration defaultDatabase="Subscriptions2_Test"/>

</configuration>

It appears that this database connection string is not being found when I run the installed app. I'm sure there must be a simple solution here.

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message news:ec**************@TK2MSFTNGP02.phx.gbl...
I don't appear to be missing anything. I have reinstalled the Enterprise
Library in full.

My WARC_Subs_Reporting.dll references WARC_Shared_Functions.dll which in
turn references 2 enterprise library dll's. My setup project for
WARC_Subs_Reporting.dll shows the other 3 dll's as dependencies. Upon
install, all 4 dll's are copied to the correct directory as expected.

When I then run my test project which references WARC_Subs_Reporting.dll, I
can step through until I receive the error. This happens whether I add the
dll's to the GAC or not.


"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:M%****************@TK2MSFTNGXA01.phx.gbl...
Hi Chubby,

Since the inner exception is a FileNotFoundException, could you please if
you're missing something? Are the assemblies you're referencing all exists
and registered successfully?

I agree with Nicholas that the assemblies referenced by assembly in GAC
should all be in GAC.

Kevin Yu
Microsoft Online Community Support

================================================== ==========================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ==========================
==========================

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


Jun 9 '06 #9
I have now removed this DB argument and the app errors when trying to find the default database.

I have a config file in both my DLL's and now also in the Enterprise Library Data DLL, but it still cannot find the entries within it and so I suspect cannot see the config file at all.


"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message news:uq**************@TK2MSFTNGP05.phx.gbl...
When I create a database I use the following procedure:

Public Class clsConnection

Function CreateDataset(ByVal strSQL As String, ByVal conn As String) As DataSet

Dim db As Database = DatabaseFactory.CreateDatabase(conn)

Dim sqlcommand As String = strSQL

Dim dbcommand As System.Data.Common.DbCommand = db.GetSqlStringCommand(sqlcommand)

Dim ds As DataSet = db.ExecuteDataSet(dbcommand)

Return ds

End Function

as you can see I am supplying an argument ('conn' in this case Subscriptions2_Test) for the 'DatabaseFactory.CreateDatabase'. It seems to me that the problem is here somewhere. The demo app supllied with Ent Lib does not use this argument.

I have an app.config file included as part of my dll which looks like this:

<configuration>

<configSections>

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.C onfiguration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" />

</configSections>

<connectionStrings>

<add name="WarcLog_Test" connectionString="server=WEBDEV;database=WARCLog;I ntegrated Security=true"

providerName="System.Data.SqlClient" />

<add name="Subscriptions2_Test" connectionString="server=WEBDEV;database=Subscript ions2;Integrated Security=true"

providerName="System.Data.SqlClient" />

<add name="WarcLog" connectionString="server=WARC;database=WARCLog;Int egrated Security=true"

providerName="System.Data.SqlClient" />

<add name="Subscriptions" connectionString="server=ACC_SQL2K;database=Subscr iptions;Integrated Security=true"

providerName="System.Data.SqlClient" />

</connectionStrings>

<dataConfiguration defaultDatabase="Subscriptions2_Test"/>

</configuration>

It appears that this database connection string is not being found when I run the installed app. I'm sure there must be a simple solution here.

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message news:ec**************@TK2MSFTNGP02.phx.gbl...
I don't appear to be missing anything. I have reinstalled the Enterprise
Library in full.

My WARC_Subs_Reporting.dll references WARC_Shared_Functions.dll which in
turn references 2 enterprise library dll's. My setup project for
WARC_Subs_Reporting.dll shows the other 3 dll's as dependencies. Upon
install, all 4 dll's are copied to the correct directory as expected.

When I then run my test project which references WARC_Subs_Reporting.dll, I
can step through until I receive the error. This happens whether I add the
dll's to the GAC or not.


"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:M%****************@TK2MSFTNGXA01.phx.gbl...
Hi Chubby,

Since the inner exception is a FileNotFoundException, could you please if
you're missing something? Are the assemblies you're referencing all exists
and registered successfully?

I agree with Nicholas that the assemblies referenced by assembly in GAC
should all be in GAC.

Kevin Yu
Microsoft Online Community Support

================================================== ==========================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ==========================
==========================

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


Jun 12 '06 #10
My test app is called WindowsApplication3

When I run, it steps through my DLL's and into the EntLib DLL's with the
configurationsource showing as :

C:\temp\2005\WindowsApplication3\WindowsApplicatio n3\bin\Debug\WindowsApplication3.vshost.exe.config

which does not exist.

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:EJ**************@TK2MSFTNGXA01.phx.gbl...
Hi Chubbly,

Based on my analyze, the configurationSource in your buidUp method might
be
incorrect. Has the configuration file been put to a directory that the
enterprise library can see? Please use F11 to step into the method and
check the value for configurationSource.

Kevin Yu
Microsoft Online Community Support

================================================== ==========================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ==========================
==========================

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

Jun 12 '06 #11
OK, I've wasted too much time so I'm going to give up trying to get this to work.

I've replaced
Dim db As Database = DatabaseFactory.CreateDatabase(conn)

with

Dim db As SqlDatabase = New SqlDatabase(conn)

and all seems to work fine at the moment.

I eventually found this on someone's blog. Is it me, but I can't find any actual documentation for the Enterprise Library. I wish I'd left my original code in place, this all seems like a bit too much hassle.

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message news:eY**************@TK2MSFTNGP05.phx.gbl...
My test app is called WindowsApplication3

When I run, it steps through my DLL's and into the EntLib DLL's with the
configurationsource showing as :

C:\temp\2005\WindowsApplication3\WindowsApplicatio n3\bin\Debug\WindowsApplication3.vshost.exe.config

which does not exist.



"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:EJ**************@TK2MSFTNGXA01.phx.gbl...
Hi Chubbly,

Based on my analyze, the configurationSource in your buidUp method might
be
incorrect. Has the configuration file been put to a directory that the
enterprise library can see? Please use F11 to step into the method and
check the value for configurationSource.

Kevin Yu
Microsoft Online Community Support

================================================== ==========================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ==========================
==========================

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


Jun 12 '06 #12

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

Similar topics

1
by: Rick | last post by:
After upgrading to .Net 1.1 and VS.Net 2003 the Oracle DAAB is busted. There was a previous post with no followup in the last month so I am reposting the issue in hopes that someone has already...
0
by: sedefo | last post by:
I ran into this Microsoft Patterns & Practices Enterprise Library while i was researching how i can write a database independent data access layer. In my company we already use Data Access...
1
by: Özgür Aytekin | last post by:
Hello NG Is DAAB 3.1 the offical replacement of Microsoft Data Access Application Block 2.0? DAAB 3.1 download:...
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...
7
by: Alec MacLean | last post by:
Hi all, I'm trying to deploy an ASP.NET (1.1) app to our production webserver, but having problems with the DAAB (from Ent Lib June 2005). As you might guess, it works just fine and dandy on my...
8
by: Alec MacLean | last post by:
Hi, I'm using the DAAB Ent Lib (Jan 2006) for .NET 2.0, with VS 2005 Pro. My project is a Web app project (using the WAP add in). Background: I'm creating a survey system for our company, for...
2
by: =?Utf-8?B?TWlrZVo=?= | last post by:
I created a function to use DAAB return a datareader. The connection must keep opening when I consume the datareader. 1. I tested the function, it works. Even I use the datareader after 10...
5
by: | last post by:
Hi, I'm having difficulty connecting my .NET web app to my SQL2000 database via the DAAB. I'm using VS2003 with .NET 1.1. I'm currently trying names such as Initial Catalog, Data Source, User...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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.