locked
issue with scaffolding dynamic data links RRS feed

  • Question

  • User-1940217116 posted

    Hi.  I'm following the instructions at https://msdn.microsoft.com/en-us/library/cc488469.aspx .  I'm stuck on the instruction you see below.  I believe the error I got is same one u see below the instruction but i'll have to retrace my steps to be sure.  I chose web app over web site not really knowing the diff.  I wish the instructions would have explained how I can simply connect to the db instead of copying an mdf over the wire to this non sql server where we develop in vs. 

    In the O/R Designer, click the Server Explorer link (Database Explorer in Visual Web Developer).

    The file U:My Documents\Visual Studio 2010\Projects\WebApplication1\App_data\dynamicLinq.df is on a network path that is not supported for database files...

    Friday, April 28, 2017 11:11 AM

All replies

  • User-330204900 posted
    This is an out of date example if you are using a version ofVS newer than 2010 thing will be quite different. E.g. in vs2013 and later the the old project template are not present you will need to get them from the vs store they are free.
    Friday, April 28, 2017 11:30 AM
  • User-1940217116 posted

    thx.  I'm using vs 2010.   I did just notice though that the instructions at that link may be for a version  later than 2010.  It isn't clear as the post doesn't say either way.  But there is a version selector at that link that leaves no doubt.  I'll follow the version 2010 instructions and post back here if there are any problems. 

    Friday, April 28, 2017 11:40 AM
  • User-1940217116 posted

    so I did follow the vs 2010 instructions following the linq rather than ado route at https://msdn.microsoft.com/en-us/library/cc488469(v=vs.100).aspx.  We rdp into a remote server to do vs 2010 development.  When I got to the step where I needed to point at a db file, I stopped the sql server service on my local and then using my local's computer name and c drive etc  as the location of the mdb file which contains the tables I'd like to model, it appears that this scaffolding tool was happy, perhaps making a copy of the mdf.  But once again after clicking the Server Explorer link in OR, and then opening server explorer and trying to expand my connection, I get a similar error as shown below.  I even tried stopping the sql service on my local again and then refreshing the server explorer pane but it seems that whatever is wrong remains wrong. 

    The file "\\xxxxxxxx\home\My Documents\Visual Studio 2010\WebSites\WebSite1\App_Data\dynamicLinq.mdf" is on a network path that is not supported for database files.
    An attempt to attach an auto-named database for file \\xxxxxxxx\home\My Documents\Visual Studio 2010\WebSites\WebSite1\App_Data\dynamicLinq.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

    I'm going to try pointing vs 2010 to a drive local to the remote server for project location and see what happens.

    Friday, April 28, 2017 4:49 PM
  • User-1940217116 posted

    new error but seems more promising.  The error I get now says database localdrive;\...mdf cannot be opened because it is version 706.  This server supports version 655 and earlier.  A downgrade path is not supported...

    HELP.  I'll see what I can find on the web about this specific error.  I should mention that the db I pointed to on my local after stopping sql service locally is 2012. 

    Friday, April 28, 2017 5:08 PM
  • User-330204900 posted

    Hi this simply means you had say a sql server database for sql2016 but are using sql2012 hope that makes sense
    Friday, April 28, 2017 5:47 PM
  • User-707554951 posted

    Hi db042190,

    Version 706 is a database file from Sql Server 2012

    Version 655 is a database file from Sql Server 2008( not 2008 R2)

    The error means that the database.mdf file that you are using was created with Sql Server 2012,

    but the current instance of Sql Server is 2008.

    You need to either recreated database.mdf locally with Sql Server 2008, or see if your hosting provider can upgrade you to Sql Server 2012.

    they only seem to provide free hosting with Microsoft Sql Server 2008 Express Edition. You can download a copy of it from here. Install this locally, use it from your app, and then upload it to the hosting provider.

    Best Regards

    Cathy

    Monday, May 1, 2017 7:03 AM
  • User-1940217116 posted

    thx.  That sounds great but I need to ask...

    1) does that mean that the web app I was hoping to build wont be able to do insert/update/delete on anything besides sql 2008 after it is generated?

    2) what does "current instance" mean in the context of vs2010?  Is a specific version of sql server somehow inherently tied to this vs environment?  Why is it that in ssis etc, the version of sql has no bearing on the success of building a solution.  But here in a web app it does?

    3) what do you mean by hosting provider?  I'm in a dev environment using vs.  Hoping to move the generated app to a prod environment where any version of sql is fair game for CRUD actions.

    Monday, May 1, 2017 11:28 AM
  • User-330204900 posted
    If you are in a dev environment not sure why you are having any issues, the database should be the version of sql server you created it on? You just need to put sql server 2012 developer edition onto your dev pc, you must have built the db on a different pc.
    with 2012 but the pox you are running ir on had 2008r2 installed?&lt;br&gt;<br>
    Monday, May 1, 2017 6:02 PM
  • User-1940217116 posted

    thx.  You seem to have typos in your response and you seem to be using biblical words.  So I'm not sure what you are saying. 

    The vs 2010 dev environment is a server I rdp into to do vs 2010 development.  I didn't set it up.  I'm still asking what a db version has to do with a web app being developed under vs2010 there.  Did whomever installed vs2010 there need to point at an instance of sql during installation for some reason?

    My local pc has sql 2012 installed.  Its from there that I created the mdf , shut down sql, and allowed this dynamic link product to make a copy of the disconnected mdf by pointing at my pc as if it was a server on the network.  I suspect I can find sql 2008 somewhere to create an mdf but still want to know if the generated dynamic data link app is then going to work only on 2008 db's? 

    Tuesday, May 2, 2017 10:31 AM
  • User-330204900 posted
    Fixed my post, sorry about the typos I'm on my mobile on vacation and predictive text always gets me. Not sure why you are seeing the requirement for sql2008 you must be using something old like linq to sql if so you need to use entity framework instead L2S has had no updates since SQL2008r2. What version of visual studio are you using?
    Tuesday, May 2, 2017 11:54 AM
  • User-1458155879 posted
    Does ir has to be .mdf?
    Why don't you create it directly un a sqlserver?

    Wednesday, May 3, 2017 2:10 PM
  • User-1940217116 posted

    vs2010.  I believe one of the choices when following the instructions is between ado and linq to sql.  I believe I chose linq to sql. 

    Monday, May 8, 2017 11:56 AM
  • User-1940217116 posted

    thx cnporras, I don't know what an ir is.  Not sure what u want me to create directly on a sql server.  I'm just trying to get started.  I'd heard this technology was easy to use.

    Monday, May 8, 2017 12:00 PM
  • User-1847166894 posted

    not "ir" but "it"
    just mispelled
    .mdf is a "access file database"
    can be easily created in SQL Server Express instead and you won't have to deal with the connectivity issue

    that's all

    Wednesday, May 10, 2017 3:24 AM