Asked by:
How to create database.mdf in wpf or windows forms and to get connection string?

Question
-
My professor asked me, to create windows application using wpf or windows forms as well as to attach database in this application so that if anyone knows please tell me how to do this?
Thanks & Regards
Murugansil
- Moved by Stanly Fan Thursday, May 24, 2018 1:50 AM
Friday, May 4, 2018 6:45 PM
All replies
-
What have you done so far? What has the professor taught you? If the professor has taught you nothing then they are no good for you. The people here will help you if you have specific questions but if you need to be taught everything then you need to get a professor that is a real professor and/or you need to get a book.
Sam Hobbs
SimpleSamples.InfoFriday, May 4, 2018 7:47 PM -
Hi Murugansil,
>>How to create database.mdf in wpf or windows forms and to get connection string?
In Windows Forms Application, you can do your purpose with the following steps:
1, Right click your project and add a new item:
2, Select a database to add it:
3, You can get the Connection string:
Regards,
Frankie
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- Proposed as answer by Cherry BuMicrosoft contingent staff Wednesday, May 9, 2018 5:38 AM
Monday, May 7, 2018 2:01 AM -
Hi Murugansil,
Have you solved this problem now?
I think the above reply can provide you with a solution, have you tried it?
If so, hope you can close this thread by marking the reply as answer as this will help others looking for the same or similar issues down the road.
Best Regards,
Frankie
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Friday, May 11, 2018 8:15 AM -
I created what you said above statement but whenever i run this application to enter all data in WPF application but not showing in that table, but it is showing data in datagrid while it is opening sql server then only i can view data in datagrid
Thanks & Regards
Murugansil
Monday, May 21, 2018 5:06 PM -
Hi Murugansil,
The solution I provided above is used in Windows Forms application, if you have any issues about WPF, it will be more appropriate to ask your question at Windows Presentation Foundation (WPF) Forum
Thank you for your understanding.
Regards,
Frankie
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Tuesday, May 22, 2018 1:54 AM