dcsimg
Results 1 to 2 of 2

Thread: Entity Framework connection string issue

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2018
    Posts
    48

    Entity Framework connection string issue

    I am using EF connection string in my project,and it doesnt work. i will post my code and can anyone tell me how to rebuild debug.appconfig and relase.appconfig bcuz i have an error to
    Name:  xee22222.png
Views: 217
Size:  1.9 KB

    Here is my connection string code :

    Code:
        <add name="dentnedEntities" connectionString="data source=DESKTOP-Q8526KR\SQLEXPRESS;Integrated Security=SSPI;
                           database=dentned;
                           AttachDBFilename=|DataDirectory|dentned.mdf;
                           User Instance=true"
         providerName="System.Data.SqlClient" />
    I have create another one and it doesnt work here is the 2nd code :

    Code:
    <add name="dentnedEntities" connectionString="metadata=res://*/Entity.Model_dentned.csdl|res://*/Entity.Model_dentned.ssdl|res://*/Entity.Model_dentned.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=DESKTOP-Q8526KR\SQLEXPRESS;initial catalog=dentned;Integrated Security=true; MultipleActiveResultSets=True;App=EntityFramework&quot;" />

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    31,943

    Re: Entity Framework connection string issue

    delete that second one... it's jsut too wrong to fix. The first one... I don't know how you managed to mangle that one... but you've managed to mix two connection types there. First thing you need to decide is if you're connecting to a database on a SQL Server instance, or if you're wanting to connect to a database file... once you decide that, you then need to delete the parts that are for the other connection type. If you need help pop over to https://www.connectionstrings.com/sqlconnection/ for a properly formatted connection string.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width