locked
Lightswitch - No data sources are available RRS feed

  • Question

  • I recently installed Visual Studio 2010, lightswitch 2011 and SQL server 2008 Express with an instance named SQLExpress.  When I create a new project in visual studio and try to attach to an external data source I get an error dialogue of "No data sources are available." The program doesn't get to the point where I actually select a data source.  Thanks for any help.
    Tuesday, October 11, 2011 1:55 PM

Answers

  • The path for my issue was: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config and of course I edited the machine.config file.  The tag is near the bottom of the file and my corrected entry was:

     <DbProviderFactories>

     <add name="IBM DB2 for i .NET Provider" invariant="IBM.Data.DB2.iSeries" description=".NET Framework Data Provider for IBM i" type="IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26"/>

    <add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/></DbProviderFactories>

     

    When I installed IBM CLient Access it put an extra <DbProviderFactories> on the end.  Sorry I had said DBdFactories.  The right spelling might help.  I hope this helps.  You do not have to uninstall client access.


    Vern Miller
    • Marked as answer by VernMiller Thursday, October 13, 2011 3:07 PM
    Thursday, October 13, 2011 3:03 PM

All replies

  • Hi Vern

    So, when you click in Solution Explorer on Data Sources/Add Data Sources/Database/Next
    you need to get dialog: Choose Data Source.

    If you have any data provider installed on your computer you'll get next dialog for Connection properties of your connection to external data source

    So, I think you need to install data provider to be able to connect (LightSwitch will connect to any data source that has an Entity Framework provider).

    Hope this help

    Spaso Lazarevic


    Tuesday, October 11, 2011 2:25 PM
  • Thanks for your reply.  The problem is I don't get that far.  As soon as I hit database I get the error I submitted. Thanks again.

     

     


    Vern Miller
    Tuesday, October 11, 2011 2:35 PM
  • Vern,

    Have you installed any other EF providers?

    Here's a similar error that relates to the DB2 data provider.

    http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/d8c8c751-42a9-4aba-ae4c-45dec2f4b09a/

    Tim

    Tuesday, October 11, 2011 2:49 PM
  • It looks like that could be my problem as I have installed client access.  The last sentence of the thread pretty much sums it up as it was working fine on my PC before I formatted and reinstalled Windows 7.  That PC also had client access.  I will uninstall and see if that fixes the issue.  Thanks for finding that thread.
    Vern Miller
    Tuesday, October 11, 2011 2:54 PM
  • For anyone else who encounters this error when IBM client access is installed it places a bonus <DBdFactories> tag in that section of the machine.config file. Thanks for everyhone's input.
    Vern Miller
    • Marked as answer by VernMiller Wednesday, October 12, 2011 2:36 PM
    • Unmarked as answer by VernMiller Thursday, October 13, 2011 3:07 PM
    Wednesday, October 12, 2011 2:35 PM
  • I'm running into this same issue.  Were you able to resolve it?  I am not seeing a <DBdFactories> tag in my machine.config.  I do not want to have to uninstall the ibm client access app.   Anyone have any other thoughts on resolving this issue?  Thank you, in advance, for your help!!!

     

    Sara

    Thursday, October 13, 2011 2:41 PM
  • The path for my issue was: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config and of course I edited the machine.config file.  The tag is near the bottom of the file and my corrected entry was:

     <DbProviderFactories>

     <add name="IBM DB2 for i .NET Provider" invariant="IBM.Data.DB2.iSeries" description=".NET Framework Data Provider for IBM i" type="IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26"/>

    <add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/></DbProviderFactories>

     

    When I installed IBM CLient Access it put an extra <DbProviderFactories> on the end.  Sorry I had said DBdFactories.  The right spelling might help.  I hope this helps.  You do not have to uninstall client access.


    Vern Miller
    • Marked as answer by VernMiller Thursday, October 13, 2011 3:07 PM
    Thursday, October 13, 2011 3:03 PM
  • You're a genius!  Thank you!  Yes, that is exactly the problem and I never would have noticed it because the first closing tag (</DbProviderFactories>)was on the previous line and scrolled off the page.
    Thursday, October 13, 2011 3:20 PM
  • I'm hardly a genius and am so impressed with this forum as it's the first time I used it.  Several people got me in the ballpark and I was able to figure it out by comparing an older machine which had an older version of client access.  I'm glad it helped as I know how frustrated I was for several days.
    Vern Miller
    Thursday, October 13, 2011 3:26 PM