Jump to content

C# Visual Studio 2013 Setup Yapmak


lamont
 Share

Recommended Posts

C# Visual Studio 2013 Sürümünde InstallShield Setup Oluşturuyorum ama Başka Bilgisayara Kurdugumda SQL Verilerine Ulaşamıyor SQL Dataları Setup İçine Dahil Ediyorum Baska PC Kurdugumda SQL datasına ulaşamıyor Program Açılıyor Visual Studio 2013 Bu Durumu Nasıl Düzeltebilriz

Link to comment
Share on other sites

  • Editor

SQL in mdf dosyasına bağlanırken 

 

Application.StartupPath ile belirtirsen ve db yide exe nin yanına attırırsan problem olmaz.

Link to comment
Share on other sites

Tabiki Sayın Editörüm Buyrun

 

 public SqlConnection baglanti()
        {
            SqlConnection con = new SqlConnection("Data Source =(local); Integrated Security=true; Initial Catalog=ajanda");
            con.Open();
            if (con.State == ConnectionState.Open)
            {
                return con;
            }
            return null;
        }
Edited by lamont
Link to comment
Share on other sites

  • Editor

sql server kurulu onamı bağlanıyorsun yoksa mdf dosyasınamı. 

 

eğer sql ise diğer pcdede sql server ı kurman lazım. Yok mdf dosyası ise sql kodunu bu şekilde değiştirmen lazım.

Server=.\SQLExpress;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;Database=dbname;
Trusted_Connection=Yes;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...