Publishing Database apps.
-
I built a database driven application, when i tried to publish this by building my own setup project and what not, when i install and run the program i get errors saying it can't link to the database etc. Does anyone know why or, what's the proper procedure for publishing database driven apps, do i need to include the database in the setup file?
Please check out my articles: The ANZAC's articles
-
I built a database driven application, when i tried to publish this by building my own setup project and what not, when i install and run the program i get errors saying it can't link to the database etc. Does anyone know why or, what's the proper procedure for publishing database driven apps, do i need to include the database in the setup file?
Please check out my articles: The ANZAC's articles
you need not to include the database file in the set-up project,but you have to install the database in the machine where the application is running.......moreover if its a client-server application then install the database in the server...... and finally check for the connection string whether it is pointing to the right database in the right machine or not......
Tirtha Do not go where the path may lead, go instead where there is no path and leave a trail. Author: Ralph Waldo Emerson (1803-82), American writer, philosopher, poet, essayist
-
you need not to include the database file in the set-up project,but you have to install the database in the machine where the application is running.......moreover if its a client-server application then install the database in the server...... and finally check for the connection string whether it is pointing to the right database in the right machine or not......
Tirtha Do not go where the path may lead, go instead where there is no path and leave a trail. Author: Ralph Waldo Emerson (1803-82), American writer, philosopher, poet, essayist
ok. how do i install the database and what not and set the connection string correctly?
Please check out my articles: The ANZAC's articles
-
ok. how do i install the database and what not and set the connection string correctly?
Please check out my articles: The ANZAC's articles
First, you have to say which database you're using. Sql Server, MySQL, Access?? Then you have to tell us what deployment method you're using. Is it ClickOnce, or a Setup and Deployment project, creating an .MSI installation, or something else??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
First, you have to say which database you're using. Sql Server, MySQL, Access?? Then you have to tell us what deployment method you're using. Is it ClickOnce, or a Setup and Deployment project, creating an .MSI installation, or something else??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Ok i'm doing a setup deployment project using an SQL database.
Please check out my articles: The ANZAC's articles
-
Ok i'm doing a setup deployment project using an SQL database.
Please check out my articles: The ANZAC's articles
There's nothing to deploy. You can either build the connection string at deployment time using custom actions, or, a more flexible option, is you have this is a setting in your application and you create a new connection string using a template, filling in the server name.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
There's nothing to deploy. You can either build the connection string at deployment time using custom actions, or, a more flexible option, is you have this is a setting in your application and you create a new connection string using a template, filling in the server name.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007ok...you make it sound simple, but maybe i should clarify. I am really just getting the hang of database stuff so i don't know exactly how to do what you are telling me. As far as i know the connection string is in a setting, i just don't know how to set it properly to the computer it gets installed on, i figure i do it on form load, but how exactly would i go about it. Here is the default connection string in settings:
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PasswordManager.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True
Do you think you could be so kind as to explain it all to me please. Please if you could explain what i have to change and how.Please check out my articles: The ANZAC's articles
-
ok...you make it sound simple, but maybe i should clarify. I am really just getting the hang of database stuff so i don't know exactly how to do what you are telling me. As far as i know the connection string is in a setting, i just don't know how to set it properly to the computer it gets installed on, i figure i do it on form load, but how exactly would i go about it. Here is the default connection string in settings:
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PasswordManager.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True
Do you think you could be so kind as to explain it all to me please. Please if you could explain what i have to change and how.Please check out my articles: The ANZAC's articles
If you're installing SQLExpress, then all you need to do is put the .MDF file in the same folder as your executable, under the Program Files folder. The
|DataDirectory|
path of the connection string is automatically replaced with the path your .EXE was launched from. You don't have to do anything else to your installation. Nor do you have to do anything in your application or the connection string. So, if your .EXE is launched from "C:\Program Files\MyCompany\MyApplication\app.exe", the|DataDirectory|
replacement will get "C:\Program Files\MyCompany\MyApplication". This results in a connection string that looks like:Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Program Files\MyCompany\MyApplication\PasswordManager.mdf;
Integrated Security=True;Connect Timeout=30;User Instance=TrueA guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
If you're installing SQLExpress, then all you need to do is put the .MDF file in the same folder as your executable, under the Program Files folder. The
|DataDirectory|
path of the connection string is automatically replaced with the path your .EXE was launched from. You don't have to do anything else to your installation. Nor do you have to do anything in your application or the connection string. So, if your .EXE is launched from "C:\Program Files\MyCompany\MyApplication\app.exe", the|DataDirectory|
replacement will get "C:\Program Files\MyCompany\MyApplication". This results in a connection string that looks like:Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Program Files\MyCompany\MyApplication\PasswordManager.mdf;
Integrated Security=True;Connect Timeout=30;User Instance=TrueA guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007i'm beginning to sound dumber and dumber here, but how do i put the database in the folder, through the deployment project or programmatically?
Please check out my articles: The ANZAC's articles
-
i'm beginning to sound dumber and dumber here, but how do i put the database in the folder, through the deployment project or programmatically?
Please check out my articles: The ANZAC's articles
The deployment project. Right-click the Application Folder in the File System, pick Add, then Project Output. In the dialog that shows up, click on Content, then OK. Rebuild the solution.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
The deployment project. Right-click the Application Folder in the File System, pick Add, then Project Output. In the dialog that shows up, click on Content, then OK. Rebuild the solution.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Its all working now, thanks a heap for your help, i've learnt some valuable information. Thanks again. P.S. I must say, as cynical as you sometimes seem, you are one of the most effective helpers on here and well and truly deserving of the MVP.
Please check out my articles: The ANZAC's articles
-
Its all working now, thanks a heap for your help, i've learnt some valuable information. Thanks again. P.S. I must say, as cynical as you sometimes seem, you are one of the most effective helpers on here and well and truly deserving of the MVP.
Please check out my articles: The ANZAC's articles
I tend to add a bunch of sarcasm to what I say, though I do get short with people who don't bother to help themselves. I'm definitely not saying that you're one of them.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007