Click here to Skip to main content
15,900,477 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to add blank line Pin
netJP12L22-May-08 11:59
netJP12L22-May-08 11:59 
GeneralRe: how to add blank line Pin
Pete O'Hanlon22-May-08 22:28
mvePete O'Hanlon22-May-08 22:28 
AnswerRe: how to add blank line Pin
Christian Graus22-May-08 13:41
protectorChristian Graus22-May-08 13:41 
QuestionInhertited set of controls with default implementation Pin
Benny Jaminé22-May-08 11:14
Benny Jaminé22-May-08 11:14 
QuestionProblem with deployment Pin
Shuaib wasif khan22-May-08 8:47
Shuaib wasif khan22-May-08 8:47 
AnswerRe: Problem with deployment [modified] Pin
Peter Josefsson Sweden22-May-08 10:03
Peter Josefsson Sweden22-May-08 10:03 
GeneralRe: Problem with deployment Pin
Shuaib wasif khan22-May-08 10:29
Shuaib wasif khan22-May-08 10:29 
GeneralRe: Problem with deployment Pin
Peter Josefsson Sweden22-May-08 11:09
Peter Josefsson Sweden22-May-08 11:09 
Yes, I understood the problem. I'll try to repeat the answers so that they are easier to understand:

Again: The "GO" keyword is NOT an SQL keyword. It works ONLY in SQL Query Analyzer, Enterprise Manager or OSQL.

You must do EITHER a OR b below:

a) Split your files on the GO keywords and execute each part separately, one at a time. You cannot just remove the GO keywords and execute it all at once, as some statements need to be executed separately (such as create procedure). You must be careful not to just split on the text GO, as it can be embedded in strings or table names or something. You could use a regular expression for that (google regular expressions).

b) Use osql to execute the files. It understands GO.

I don't have 1.1 installed any more, but in Visual Studio 2005 you can specify commands to be run post install, using practical macros for your application folder and similar important locations. You'll have to figure out how that works in 1.1 unless you already know. If I'm wrong and you can only run code in the installer class - search for articles on executing external commands from code (you should find plenty of them).

As for location of files: Add the script files (SQL and CMD) files as dependencies to your setup project and have them installed to your app path. It's a bit trickier with picking a destination for the database, as data shouldn't be placed in the app path, and the default data location for the MSDE data files (for the instance you install) may be hard to figure out (might not be the same on all machines). On the other hand, they don't HAVE to be installed there, so you could place them in the application data folder (which should be available as an alias in the setup project configuration and in the postinstall command editor - they are in 2005). Note that the user must select "install for all user" for that to be the shared appdata folder.

Again, I don't remember how 1.1 worked anymore, but I think it was pretty similar. The documentation should be of help - or use google, or search on CodeProject. You should find lots of articles on the subject.

--
Peter

GeneralRe: Problem with deployment Pin
Peter Josefsson Sweden22-May-08 11:19
Peter Josefsson Sweden22-May-08 11:19 
QuestionProblem with Access database connectivity in C#.Net Pin
Verghese22-May-08 6:47
Verghese22-May-08 6:47 
AnswerRe: Problem with Access database connectivity in C#.Net Pin
Gareth H22-May-08 7:02
Gareth H22-May-08 7:02 
GeneralRe: Problem with Access database connectivity in C#.Net Pin
Verghese22-May-08 8:48
Verghese22-May-08 8:48 
GeneralRe: Problem with Access database connectivity in C#.Net Pin
Verghese22-May-08 9:01
Verghese22-May-08 9:01 
AnswerRe: Problem with Access database connectivity in C#.Net Pin
Sujith C Jose22-May-08 8:05
Sujith C Jose22-May-08 8:05 
GeneralRe: Problem with Access database connectivity in C#.Net Pin
Verghese22-May-08 8:58
Verghese22-May-08 8:58 
QuestionWhat does Application.SetCompatibleTextRenderingDefault (bool) do? Pin
Jordanwb22-May-08 6:11
Jordanwb22-May-08 6:11 
AnswerRe: What does Application.SetCompatibleTextRenderingDefault (bool) do? Pin
Judah Gabriel Himango22-May-08 6:30
sponsorJudah Gabriel Himango22-May-08 6:30 
GeneralRe: What does Application.SetCompatibleTextRenderingDefault (bool) do? Pin
Jordanwb22-May-08 9:34
Jordanwb22-May-08 9:34 
GeneralRe: What does Application.SetCompatibleTextRenderingDefault (bool) do? Pin
Judah Gabriel Himango23-May-08 4:46
sponsorJudah Gabriel Himango23-May-08 4:46 
Questioncomparing 2 strings Pin
Jerry Graham22-May-08 5:37
Jerry Graham22-May-08 5:37 
AnswerRe: comparing 2 strings Pin
Gareth H22-May-08 6:09
Gareth H22-May-08 6:09 
Questionlistview problem Pin
angels77722-May-08 5:11
angels77722-May-08 5:11 
AnswerRe: listview problem Pin
Judah Gabriel Himango22-May-08 5:34
sponsorJudah Gabriel Himango22-May-08 5:34 
QuestionI can't seem to find the BitArray equivalent to Array.ConstrainedCopy() Pin
Zig15822-May-08 4:41
Zig15822-May-08 4:41 
AnswerRe: I can't seem to find the BitArray equivalent to Array.ConstrainedCopy() Pin
Judah Gabriel Himango22-May-08 6:26
sponsorJudah Gabriel Himango22-May-08 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.