Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Attach Database in visual studio ; Windows Application
 

Attach Database in visual studio ; Windows Application

Hi,

I am making a windows application in Visual Studio 2008 in C#.
I need to have a datbase of Username & Password in my application, which can then be use to authenticate & restrict(assign rights) to different types of users. Admin , guest etc.


So how do i go about attaching a datbase to(.mdf or something else) .I just need to know how to attach a database .

this application will then be installed using exe file on any system. So i need a fix which is indpendent of the machine & it's settings.
Sahil Ansari  Monday, August 10, 2009 8:57 AM

Where is this database going to reside? Do you mean you will have a central database like SQLServer that everyone will access, or you want to add a database and each user has their own? I"m not sure what you mean by "attach a database" -- have you createda database and added it to your project?

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, August 11, 2009 4:22 AM
Hi,

Well it's going to be a Windows Aplication , running on any PC, installed using an exe.

So can i have database attached to my Windows Project(If Yes, then how, which is not dependent on the local machine).

I mean i only supply an exe of my project, and every thing including databaseis within it.(within the exe or it's folders after installation)

Sahil Ansari  Wednesday, August 12, 2009 3:36 PM
Generally you would either create a Setup & Deployment package, or deploy your application using ClickOnce (the Publish tab in VIsual Studio). In either case, you would deploy the database software (I'm assuming SLQExpress or SQLCE) with the application, as well as the database.

I don't know what you mean by "is not dependent on the lcoal machine" ? Do you mean you are attacdhing to, for example, a SQLSErver database that is on a central server, from your application?

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Monday, August 17, 2009 8:55 AM

You can use google to search for other answers

Custom Search

More Threads

• resource edit for an excutable.
• How to distribute Visual C++ / C Runtime Library with Clickonce app
• Publishing To a server without Frontpage Server Extension
• Windows Installer and Net Framework
• Urgent Help Needed Please
• How to change the ClickOnce Publisher Name ?
• Prerequisite directory for net 2.0
• Deploying a C# .NET application on a local intranet
• Newbie question: How do I make an installer upgrade earlier versions of my app?
• Where do you place a Local Access Database for Shared Access