none
Error trying to create datasource RRS feed

  • Question

  • I use Visual Studio 2008 and I created a VB project.  When I try to create a Data Source, I get the following error:

    "An error occurred while creating the new data source:  An error occurred while generating the data source".

    The client operating system is Vista Ultimate 32bit.  The .xsd file is created but nothing is listed under data sources. 

    Any ideas?

    Thanks
    Friday, February 15, 2008 6:07 PM

Answers

  • (Also do you think this error is related to the 'Data Sources' issue?)

     

    No it is related to xsd and the dataset creation code not talking together, and you need to choose one of the solutions in the thread at MSDN forums of manually fixing the problem or removing the Expression web.  I have told you a long time ago such problems are related to just your box and nothing else so use those manual fixes.


    Monday, February 18, 2008 9:29 PM

All replies

  • Some questions do you have Access or SQL Server installed if yes then use the connection property at the top of VS2008 to test your connection. If you are using Access it could be MDAC related because Vista comes with a new data access so see work around provided by Microsoft in the thread below.   If you don't have SQL Server installed try the second link and download the Express or Express Advanced free.

     

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=974386&SiteID=1


    http://msdn2.microsoft.com/en-us/express/bb410792.aspx

    Friday, February 15, 2008 7:41 PM
  • Thanks for the reply

    I try to connect to a SQL Server that exist on a server box.  When I test the connection I get back the 'succeeded' message. But when I click on the 'Finish' button I get the error I posted.

    Any other pointers? Thanks
    Friday, February 15, 2008 7:47 PM
  • If you are in VS2008 Express for VB you cannot do that but if you are running Standard edition and above then you may need to enable remote connection in SQL Server.  But start with the thread below.

     

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1349167&SiteID=1

     

    Friday, February 15, 2008 8:06 PM
  • Remote connections are enabled already and I'm not using the Express edition either.  I had VS 2005 installed on this machine previously and I didn't have problems with the data sources. I removed it and installed VS 2008 and now I have this problem.
    Friday, February 15, 2008 8:20 PM
  • Try deleting everything make sure you can see your database in server explorer and start new project.

     

    Friday, February 15, 2008 8:35 PM
  • I deleted all the projects.  Removed all the data connections from the server explorer. I added the server under 'Servers' in server explorer.  Created a new data connection to the database.  I can see the tables and query against them, from 'server explorer'

    I created a new VB project. I go to data sources and try to add a new data source, I go through the wizard, I see the tables and when I click "Finish", the error reappears and I don't have anything listed under 'Data Sources'

    Friday, February 15, 2008 10:31 PM
  • Vista require admin permissions for most development tasks and make sure VS2008 is not adding wrong connection info like pointing to Express when you are connecting to a remote database.  So here is the docs for the configurations in case you missed something.

     

    http://msdn2.microsoft.com/en-us/library/w4dd7z6t.aspx

    Friday, February 15, 2008 11:34 PM
  • Thanks for the help so far.  I appreciate it.

    I have followed the instructions without any deviation. Something else must be going on.

    I went to a different workstation and I opened VS 2005.  I create a plain VB project and I added a data source to the SQL server.  Under data sources, I could see the dataset.

    I copied the project to the workstation with VS 2008. I opened the project, the wizard went through the upgrade without errors and when I clicked on 'Data  Sources', it was empty.

    Any other ideas where I should look at?

    Thanks much
    Saturday, February 16, 2008 10:54 PM
  • I did not tell you to use VS2005 with those instructions I told you to use VS2008 with the instructions, when only you are getting data source creation problem with a remote database, then something is wrong with your connectivity.  Here is all you need to make sure your remote connection is working and that firewall is not blocking your code in VS2008.


    Steps for Configuration Manager:

    Make Browser service automatic from Manual in SQL Server 2005 services

     

    Go to Network Configuration in Configuration Manager

    Enable TCP/IP

    Enable Named Pipes

     

    Surface Area Configuration tool steps:

    Go to Surface Area configuration for services and Connection

    In Database Engine click on Remote Connection

    In there change to Local and Remote

    And choose both TCP/IP and Named Pipes it is the last option.

     

     

    If you do the above and still get an error then it maybe firewall related and that is covered by Microsoft below.

     

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

     

    Saturday, February 16, 2008 11:09 PM
  • I understood you in the first place.  I followed your instructions on VS2008.  Then I did what I did with VS2005 to see if it will make a difference.

    Remote connections are already enabled.  The workstation didn't have a problem to that sql server with VS 2005.  It has problems with VS 2008, so it isn't related to remote connections.

    The firewall has been configured according to the article.  I even tried disabling the firewalls on both the server and workstation and didn't make a difference

    Just to summarize.  I had VS 2005 installed, connecting to sql server running on a server box without an issue.  I uninstalled VS2005 and installed VS2008 and when I try to create a data source I get the error and nothing is listed in the data sources pane.  After the error occurs, in the  solution explorer I can see the xsd file.


    Sunday, February 17, 2008 2:51 PM
  • I think I might have found something..

    When I edit the xsd file, I have the following warning:

    "The custom tool 'MSDataSetGenerator' filed.  Method not found: 'Void System.Data.Design.TypedDataSetGenerator(.....")

    There are also over 80 warnings.  "Could not find schema information for attribute 'urnTongue Tiedchemas-microsoft-com:xml-msdata:UseCurrentLocale'.

    Any ideas on how to solve these issues?

    Thanks
    Monday, February 18, 2008 8:12 PM
  • Monday, February 18, 2008 8:30 PM
  • Thanks for the links.  I read them but I can't say that I understand what I'm supposed to do.  I do have Expression Web installed on the computer.  I'm curious if I uninstall it and run a repair will it solve my problems.

    Also do you think this error is related to the 'Data Sources' issue?
    Monday, February 18, 2008 8:59 PM
  • (Also do you think this error is related to the 'Data Sources' issue?)

     

    No it is related to xsd and the dataset creation code not talking together, and you need to choose one of the solutions in the thread at MSDN forums of manually fixing the problem or removing the Expression web.  I have told you a long time ago such problems are related to just your box and nothing else so use those manual fixes.


    Monday, February 18, 2008 9:29 PM
  • I'll have to find a solution for the 'Data Sources' issue and you are right, I know it's just this particular box that is causing the problem.  I just thought someone might have a solution for this problem.

    Thanks for all the help.  I appreciate it.
    Monday, February 18, 2008 9:43 PM
  • I have the same issue but only when Add Data Source for SQL Server Compact 3.5 database to a smart device project.  I can connect to SQL Server Compact 3.5 database and view the tables with Server Connection but get same error as above when trying to add data source.

    I can add data source from SQL Server Compact 3.5 database to regular Windows form projects just not smart device projects ...

    http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/856e1c5d-bfd6-4dc5-9cf6-88d9605dbbea
    Tuesday, September 15, 2009 9:30 PM