Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Is there any possibility to write something in my database when setup runs.
I want to put the date and time at which setup runs.

Thanks
Posted
Comments
Wendelius 23-Dec-11 7:39am    
What setup? Setup of the database, setup of your application..? Also what kind of setup mechanism are you using?
Furqan Sehgal 24-Dec-11 0:46am    
Setup of application,,,,,,,,, I am using VS setup mechanism

Yes - all you have to do is connect as usual, and insert a new row to your table.

Why is this giving you problems?
 
Share this answer
 
You can do it in several ways, One way is to create .sql file and write all the sql statement which you want to execute at setup time. once you completed with sql statement into file. Make one small application that will take .sql file as parameter. and will execute on required database. Call that application while setup when you done with your .sql file writting.
Following article will help you to call exeternal application while setup. In your case external application will be the that application which will execute sql statement inside .sql on database.
Extending Visual Studio Setup Project[^]
 
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