Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 14th, 2003, 11:57 AM
Registered User
 
Join Date: Jul 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default System.TypeInitializationException w connection

 I've written a small app that worked fine on my laptop. The laptop is running windows 2000 with the .net framwork and development environment installed. I moved the exe and pdb generated by the build to one of our servers. This server has the .net framework on it. For some reason when I run it on this server I get the following error:

An exception 'System.TyepInitialization.Exception' has occurred in Myprogram.exe


The app did a number of things but, for the sake of debugging this problem, I've stripped eveything else out. All I have now is a public sub main with nothing in it and a global declartion at the top of the module:

  Dim myConnection As New System.Data.OleDb.OleDbConnection()

That's all. If this declaration in there it causes the error. If it is commented out, the program runs (though it doesn't do anything).

We have other exe's running on this same server that also declare a New System.Data.OleDb.OleDbConnection() and they work fine. I added the adodb reference but the problem is still there. Any suggestions?

Thanks,
Neil
 
Old July 19th, 2003, 02:11 PM
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

May be in VB - world it's diffirent, but in c# I reference System.Data.dll.


 
Old February 9th, 2004, 06:50 PM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Neil,

Have you found an answer to this? I'm having a similar problem with an app of mine. Thanks! -RK






Similar Threads
Thread Thread Starter Forum Replies Last Post
TypeInitializationException fezi786 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 February 5th, 2008 10:10 AM
System.NullReferenceException - Oracle Connection jonquil_31 ADO.NET 0 March 20th, 2006 05:29 AM
Deployment issue - TypeInitializationException eelisMX Pro VB.NET 2002/2003 0 March 31st, 2005 04:54 AM
System.InvalidOperationException: connection dead aleahy General .NET 0 January 28th, 2005 07:58 AM
System.TyepInitialization.Exception w connection fig000 Pro VB.NET 2002/2003 1 July 18th, 2003 08:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.