Wrox Programmer Forums
|
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 August 28th, 2008, 07:55 PM
tyc tyc is offline
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default about factory

I am reading the book <Professional ADO.NET 2: Programming with SQL Server 2005, Oracle, and MySQL>.
when the code run to this block it takes error. way?
 Public Shared ReadOnly Property Factory() As DbProviderFactory
            Get
                Return DbProviderFactories.GetFactory("Microsoft.SqlServe rCe.Client")

            End Get
        End Property


 
Old August 28th, 2008, 10:50 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What is the error detail?

-Peter
compiledthoughts.com
 
Old August 29th, 2008, 06:53 PM
tyc tyc is offline
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default


I am reading the book <Professional ADO.NET 2: Programming with SQL Server 2005, Oracle, and MySQL>.
when the code run to this block it takes error. why?
 Public Shared ReadOnly Property Factory() As DbProviderFactory
            Get
                Return DbProviderFactories.GetFactory("Microsoft.SqlServe rCe.Client")

            End Get
        End Property

the error info is belown
<
δ´¦Àí System.Configuration.ConfigurationError****ception
  BareMessage="ÕÒ²»µ½»òÎÞ·¨¼ÓÔØÒÑà —Â¢Â²Ã¡ÂµÃ„ .Net Framework Êý¾ÝÌṩ³ÌÐò¡£"
  Line=0
  Message="ÕÒ²»µ½»òÎÞ·¨¼ÓÔØÒÑ×¢ ²Ã¡ÂµÃ„ .Net Framework Êý¾ÝÌṩ³ÌÐò¡£"
  Source="System.Data"
  StackTrace:
       Ã”Ú System.Data.Common.DbProviderFactories.GetFactory( DataRow providerRow)
       Ã”Ú System.Data.Common.DbProviderFactories.GetFactory( String providerInvariantName)
       Ã”Ú DataMove.CodeSamples.GenericFactoryHelper.get_Fact ory() λÖà D:\²úÆ·\µç×Ó¾¯²ì\DataMove\DataMove\Dat aMove\GenericFactoryHelper.vb:ÐкÅ 26
       Ã”Ú DataMove.CodeSamples.GenericFactoryHelper.get_Conn ectionStringBuilder() λÖà D:\²úÆ·\µç×Ó¾¯²ì\DataMove\DataMove\Dat aMove\GenericFactoryHelper.vb:ÐкÅ 46
       Ã”Ú DataMove.Form1.Button5_Click(Object sender, EventArgs e) λÖà D:\²úÆ·\µç×Ó¾¯²ì\DataMove\DataMove\Dat aMove\Form1.vb:ÐкÅ 259
       Ã”Ú System.Windows.Forms.Control.OnClick(EventArgs e)
       Ã”Ú System.Windows.Forms.Button.OnClick(EventArgs e)
       Ã”Ú System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
       Ã”Ú System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       Ã”Ú System.Windows.Forms.Control.WndProc(Message& m)
       Ã”Ú System.Windows.Forms.ButtonBase.WndProc(Message& m)
       Ã”Ú System.Windows.Forms.Button.WndProc(Message& m)
       Ã”Ú System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
       Ã”Ú System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
       Ã”Ú System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       Ã”Ú System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
       Ã”Ú System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       Ã”Ú System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
       Ã”Ú System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
       Ã”Ú System.Windows.Forms.Application.Run(ApplicationCo ntext context)
       Ã”Ú Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
       Ã”Ú Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
       Ã”Ú Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[] commandLine)
       Ã”Ú DataMove.My.MyApplication.Main(String[] Args) λÖà 17d14f5c-a337-4978-8281-53493378c1071.vb:ÐкÅ 81
       Ã”Ú System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       Ã”Ú System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       Ã”Ú Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
       Ã”Ú System.Threading.ThreadHelper.ThreadStart_Context( Object state)
       Ã”Ú System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
       Ã”Ú System.Threading.ThreadHelper.ThreadStart()
>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Not binding factory to JNDI, no JNDI name configur 4java EJB 0 August 13th, 2007 11:20 AM





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