Greetings,

I need to know how to make an .exe Windows application with a database. How to attach the database to the application and if the client server does not have a SQL Server what I should do?

While you are in the development phase you can specify the connection string but when the application is on the client server you cannot determine the connection string there as you do not know the server name or ip address of the server.

I need to know how to create a dynamic connection string so that when I make the .exe application and install it on the client server the connection string created dynamically

While you are in the development phase you can specify the connection string but when the application is on the client server you cannot determine the connection string there as you do not know the server name or ip address of the server.

For a desktop application you can put the connection strings in your app.config file. For a web application you can put connection strings in the web.config file. If you don't like the automatic awesomeness of .NET's configuration framework, you can store connection strings in a number of external locations that are retrievable at runtime.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.