Steps to create setup file in Visual studio 2012 with database.
In this post i will show the steps to create an setup file in visual studio 2012 with database. I was searching from about month for how to create setup with database but everywhere same thing only i was getting i.e without database. As we know vs2012 and newer version dont have setup and deployment option so we have to use installshield LE to create setup but the setup created with that dont work on client or other pc if it has some database. I have tried and different method to create setup without using it, and it worked for me just give a try and let me know if it works for you or not.
Below are the steps.
Below are the steps.
STEP 1
Create and empty project in vb or C#. here i have created one form and placed gridview in it.
STEP 2
Then Right click on your project name in solution explorer and select Add > New Item and choose Service-based Database. you can rename your database name with yours or any.
STEP 3
Then Double click on Database1.mdf and create and table. i have created table and inserted some data into it.
STEP 4
Then i am binding my gridview with database. to do that click on small arrow on gridview > choose other source> database>dataset> choose your database>next>select the table>finish and it will be binded.
STEP 5
Now the main thing about creating setup. Click on Build option and select publish option. now here choose the location where you want to publish the app. here i have selected desktop and selected one folder on desktop and click open.
Note:-please create an folder and select it so all files goes to one place.
STEP 6
Now select the method from where user can install your application. i have choosen cd-rom option and click on next.
STEP 7
In next step choose whether your application checks for update from some particular location or not and click next.
STEP 8
Now your application is ready to publish click finish and it will create an setup.
It is the simple way to create an setup with database and when you will install this setup file in client pc it will work. i have tested with 3 different pc and it worked in all pc, just make sure client pc must have .net framework 4.0 and above.
Please let me know if its work for you or not in comments. and if it works then please do share this post so other who are facing same problem can see it. if i will get another solution to create setup with database i will make an another post for it.
Thank you.
dear Pushpesh Pandey its really helpfull...but i need to Attach my sql server management studio database .mdf file.
ReplyDeletemy application is working perfectly but during setup project plz tell me how can i attach existing sql server databse i have already
Actually i dont need this..i want step by step procedure to create setup project in visual studio 2012 and attachment of sql server management studio database(.mdf) and what kind of changes i have to do in my connection string..plz inform me when you find a solution...
ReplyDeleteThis comment has been removed by the author.
Deleteim trying for that.
ReplyDeleteook bro.
Deleteim still trying but not getting proper success. i have asked 2 3 person who works from years in mnc companies they have told me that we have to install database on client pc then only it works, and even i have asked visual studio official page but they are not evn bother to reply. but still i will try my best.
Deletehmmmmm ook.bcoz i did't find any solution i just changed my database type.now i m using sql compact i successfully deployed my project.
Deleteis it the same for ms.access database ? thanks a lot
ReplyDeleteyes it will work, just create your database in your project folder so while creating setup it get attached to setup file.
Deletefor example your project folder name is abc then create database inside abc folder or set path of database file to abc folder so it dont give problem.
Ok i'll try this and say you if it works.
Deleteyes try it :)
Deletenot working for me :(
ReplyDeletemy access file is locate here:
Dim conn As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Bdd.mdb")
i have trying to by putting
Public dbPathAccess As String = Application.StartupPath & "\Bdd.mdb"
but no way, when i try to put the exe on my other computer it can't find the bdd !
is your bdd.mdb file is situated inside your project folder?
ReplyDeleteyes
ReplyDeletehave you tried to create the setup file through other way like with help of installshield? coz something works with it and something doesnt. give one try with that, till then i will find some solution for u. u using vs 2012 ryt?
Deleteyou A program work like a charm, i don't know why mine won't work ? what is you path for you access db file in vb.net ?
DeleteSystem.Data.OleDb.OleDbConnection("Provider= ?
thanks a lot for your help
dont do this "Public dbPathAccess As String = Application.StartupPath & "\Bdd.mdb" ", instead do one thing, delete the data source or dataset which you have created and place your .mdf file inside your project folder, and create new datasource and select the path where .mdf file is saved and connect dats it and it work for you too. my path was like E:/projects/windowsapplication1/db1.mdf.
Deleteyour connection will be like this "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\db1.mdb"
you will find this in your app.config file
Deleteok let's try this :D say you if it's working
Delete:D
sure :)
Deletewas looking for a long time for a solution for attaching a database to application... ill try it and tell u whether it works or noyt.
ReplyDeletethank you...
yes do try and let me know if problem comes :)
DeleteHi i m Er. vikas kumar software developer Please tell me how to make a perfact setup with .mdffile and that setup file also run in another system.
ReplyDeleteUpload video
this are step by steps instruction of creating the setup. i will publish video soon.
Deletethis isn't working for me in another computer.
ReplyDeleteHi kartik, can you just tell me what error or problem you facing.
ReplyDeletedo I need to have the sql server installed on the other computer?
ReplyDeleteplease i make every step u said but no data can show ...and error was "unhandled expection has occurred in your application.the application will ignore this error and attempt to continue if you click quit,the application will close immediately.
ReplyDeleteA Network -related or instance-specifiesd error occured........." its a long error that cannot reach the data >>please helpe me i cannot find any solution and i did like what u said and the data is enternal...but i didnt install the VS or mSQL in the client computer
sorry for very late reply, that error occured because your application was not able to find sqldb in pc/location. you can just install sqllocal db in pc and it will work for you.
DeleteI am new to C# programming , so can you please tell me ,why does it require .NET Framework 4.0 and above on client's computer??
ReplyDeletehi, it depends on which framework you are working. example if you are creating application using 3.5 framework then client pc needs 3.5 framework installed then only your application will work.
DeleteHey. I am getting an error: "Application Validation Did Not Succeed. Unable to continue"
ReplyDeleteI am using Visual Studio 2015 with sql .mdf database
ReplyDeleteare you getting error while installing in client pc?
DeleteYes.
DeleteMy solution has 2 projects. One dealing with the GUI and the other dealing with the classes
if you are using 4.5 or above framework then you have to install same on client pc. this error comes usually comes with it,
Deletetry this solution, open your project clean the solution from build menu then again build setup. it will clean the solution so that error should be fixed.
DeleteI was barely amazed at how you had written this content. Please keep posting.
ReplyDeleteDOT NET Training in Chennai
DOT NET Course in Chennai
I am really interested to continue reading your blog. You have shared valid info. Waiting for more updates from you.
ReplyDeleteSpoken English Classes in Chennai
Spoken English Class in Chennai
Spoken English in Chennai
Best Spoken English Classes in Chennai
Best Spoken English Institute in Chennai
Subscription boxes are a type of boxes which are delivered to the regular customers in order to build goodwill of the brand. They are also a part of the product distribution strategy. As a woman, you should subscribe to these boxes to bless yourself with a new and astonishing box of happiness each month. visit mysubscriptionsboxes
ReplyDeleteIt was helpful for me and guide my career good nothing to say in the words abouts this i suggested to everyone try this and will bet good career,
ReplyDeleteSMM PANEL
ReplyDeleteSmm Panel
iş ilanları blog
instagram takipçi satın al
hırdavat
beyazesyateknikservisi.com.tr
SERVİS
tiktok jeton hilesi
Good content. You write beautiful things.
ReplyDeletetaksi
korsan taksi
hacklink
sportsbet
vbet
vbet
mrbahis
sportsbet
hacklink
Success Write content success. Thanks.
ReplyDeletecanlı poker siteleri
betturkey
canlı slot siteleri
kıbrıs bahis siteleri
betpark
betmatik
kralbet
yurtdışı kargo
ReplyDeleteresimli magnet
instagram takipçi satın al
yurtdışı kargo
sms onay
dijital kartvizit
dijital kartvizit
https://nobetci-eczane.org/
DQ6
https://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
JİU6
urfa evden eve nakliyat
ReplyDeletemalatya evden eve nakliyat
burdur evden eve nakliyat
kırıkkale evden eve nakliyat
kars evden eve nakliyat
M8M
E9FDE
ReplyDeleteDiyarbakır Evden Eve Nakliyat
buy clenbuterol
Çanakkale Evden Eve Nakliyat
Kayseri Evden Eve Nakliyat
Ünye Boya Ustası
Siirt Şehirler Arası Nakliyat
seo fiyatları
Artvin Şehirler Arası Nakliyat
Tekirdağ Parça Eşya Taşıma
921EF
ReplyDeleteYenimahalle Boya Ustası
Çerkezköy Çatı Ustası
Çankırı Şehirler Arası Nakliyat
Karabük Evden Eve Nakliyat
Muş Şehirler Arası Nakliyat
Antep Şehir İçi Nakliyat
Muğla Şehirler Arası Nakliyat
Sivas Şehir İçi Nakliyat
Balıkesir Şehir İçi Nakliyat
894CD
ReplyDeleteAksaray Şehirler Arası Nakliyat
Sinop Evden Eve Nakliyat
Siirt Şehirler Arası Nakliyat
Edirne Parça Eşya Taşıma
Bursa Şehir İçi Nakliyat
Ünye Çatı Ustası
Diyarbakır Parça Eşya Taşıma
Afyon Şehirler Arası Nakliyat
Mardin Şehir İçi Nakliyat
C8309
ReplyDeleteAksaray Şehir İçi Nakliyat
Kastamonu Parça Eşya Taşıma
Edirne Şehirler Arası Nakliyat
Kucoin Güvenilir mi
order halotestin
Etlik Parke Ustası
Ünye Organizasyon
Çerkezköy Halı Yıkama
Bartın Şehirler Arası Nakliyat
E83FA
ReplyDeleteBitcoin Çıkarma Siteleri
Coin Kazma
Bitcoin Kazma
Kripto Para Nasıl Kazılır
Kripto Para Nasıl Çıkarılır
Bitcoin Nasıl Üretilir
Kripto Para Madenciliği Nasıl Yapılır
Coin Kazanma
Coin Madenciliği Nedir
D0EAC
ReplyDeleteResimli Magnet
4F9DD
ReplyDeletebinance referans kodu
resimli magnet
resimli magnet
binance referans kodu
referans kimliği nedir
referans kimliği nedir
resimli magnet
binance referans kodu
binance referans kodu
E0462
ReplyDeleteresimli magnet
resimli magnet
binance referans kodu
referans kimliği nedir
binance referans kodu
referans kimliği nedir
binance referans kodu
binance referans kodu
resimli magnet
959AF
ReplyDelete----
----
----
----
----
matadorbet
----
----
----
KJUKMIK,L
ReplyDeleteتسليك مجاري بالاحساء
شركة مكافحة حشرات بالاحساء WSXyJTY5e3
ReplyDeleteشركة مكافحة حشرات بالاحساء pveubp5xUF
ReplyDeleteشركة مكافحة حشرات بالاحساء 46zHAcCi4R
ReplyDeleteشركة تسليك مجاري بالخبر vY2A21eWsN
ReplyDeleteشركة تنظيف سجاد بخميس مشيط g4YuAQUffE
ReplyDeleteشركة تسليك مجاري في عجمان wp6Sg5ksVj
ReplyDeleteشركة تنظيف سجاد بخميس مشيط WBDTI0ckkm
ReplyDeleteشركة تسليك مجاري بالاحساء cHbYGQ43Aw
ReplyDelete