Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi Professionals...

I have done a project in vb.net with Sql Server Exp Ed in VS2005.. Now its perfectly

running, I can be able to retrieve or storing data to the database...

while i go for deployment part, as i go through the some articles on the web like ClickOnce,

Installer e.t.c., Its giving me Setup file along with Prerequisites files like Sqlexpress,

dotnetfx, winInstaller....

Actually My Connection string is...
 <add name="loyaltyCS" connectionstring="Data<br mode=" hold=" /><br mode=">
providerName="System.Data.SqlClient" /> </add>


Its actually running perfectly...

Microsoft suggested me to alter my ConnectionString like..

 <add name="loyaltyCS">

providerName="System.Data.SqlClient" connectionString="Data

Source=|DataDirectory|\dbloyalty.mdf;Integrated Security=True" /> 
</add>


But this Connection string not working properly....

My Questions..

1) How to Detach my Sql Database

2) How to add the database into my project...

Its giving error of
 "An Error Occured While Processing the Local Data File \n<br />
OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT 


3) How to publish vb.net windows application with Sql Server Express Edition...


PROBLEMS I FACED:

1) If I installed my Project Setup file to the C:\program files\APP\App.exe

along with first told connection string, Its running only two or three times...

After that its displaying Error Like

 "The Application failed to initialize properly (0xc000007b). Clik on OK to terminate the

application" 



I'm new to the Visual Studio Deployment, Next 15 days i have to give the exe to the Client...

Please help me...

Thanks in advance...
Venkadesh
Posted
Updated 26-May-11 19:32pm
v2
Comments
ZeeroC00l 27-May-11 1:33am    
-- added pre and code tag for readability

BR//
Harsha

1 solution

Look at the answers given for the similar question asked here[^].
Various article links are present in it that will help you achieve the same.

Have a look at these too:
Creating setup With support for database creation Using VS.NET[^]
Create database during installation of a .NET application [^]
Deploy your Application and Database[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900