Click here to Skip to main content
15,896,727 members
Home / Discussions / C#
   

C#

 
AnswerRe: A question about abstraction... Pin
Luc Pattyn18-Jul-10 8:43
sitebuilderLuc Pattyn18-Jul-10 8:43 
GeneralRe: A question about abstraction... Pin
venomation18-Jul-10 9:00
venomation18-Jul-10 9:00 
QuestionGetting "Input array is longer than the number of columns in this table." Pin
Kevin Marois18-Jul-10 7:33
professionalKevin Marois18-Jul-10 7:33 
AnswerRe: Getting "Input array is longer than the number of columns in this table." Pin
Luc Pattyn18-Jul-10 8:02
sitebuilderLuc Pattyn18-Jul-10 8:02 
GeneralRe: Getting "Input array is longer than the number of columns in this table." Pin
Kevin Marois18-Jul-10 8:36
professionalKevin Marois18-Jul-10 8:36 
AnswerRe: Getting "Input array is longer than the number of columns in this table." Pin
Rob Graham18-Jul-10 8:19
Rob Graham18-Jul-10 8:19 
Questionhelp: deploy c# windows application with sql server database Pin
pradeepwithu18-Jul-10 6:56
pradeepwithu18-Jul-10 6:56 
AnswerRe: help: deploy c# windows application with sql server database [modified] Pin
I Believe In GOD18-Jul-10 11:32
I Believe In GOD18-Jul-10 11:32 
Hi , have a good day

1- Don't Attach your database , Use Creation Script , INSERT Script , instead !

2- you can't add Sql files to the VS setup , the best way is to use http://www.installaware.com/[^]
Or you can Add the MSDE folder ( Sql Client ) next to your setup project
So the client can install it manually .

- I run the sql script to create database from my Application NOT from the setup
class InitSchema
{
    // stored script in the resource of my application 
    private static string strScript = global::BuyerQty.Properties.Resources.Scheme;
    
    public static void InitSchemaScript()
    {
        // clsSetting.DataBase Is My DataBase Name 
        DBConnect.DBCommand = new OleDbCommand("USE " + clsSetting.DataBase, DBConnect.DBConnection);
        DBConnect.DBCommand.ExecuteNonQuery();

        // After each Sql Statement I replace the "GO" word with "~", 
        // so C# can easily execute one statement at a time  
        strScript = strScript.Replace("GO", "~");
        foreach (string strQuery in strScript.Split('~'))
        {
            try
            {
                DBConnect.DBCommand = new OleDbCommand(strQuery, DBConnect.DBConnection);
                DBConnect.DBCommand.ExecuteNonQuery();
            }
            catch
            {
            }
        }
    }
}

I am C# Windows Applications , Sql programmer , and I have been through this case many times
- Only for my very stupid customers I use Click once installation for Sql like Installaware
- I use NSIS setup to deploy the Application and DotNet , and the Customer must install Sql Manually

P.S:
I hate to have 2 or more Sql Instance on my customer machine


Hope this help
I know nothing , I know nothing ...
modified on Sunday, July 18, 2010 5:38 PM

Questioninheritance of atribute. Pin
prasadbuddhika18-Jul-10 1:43
prasadbuddhika18-Jul-10 1:43 
AnswerRe: inheritance of atribute. Pin
OriginalGriff18-Jul-10 1:50
mveOriginalGriff18-Jul-10 1:50 
GeneralRe: inheritance of atribute. Pin
Abhinav S18-Jul-10 6:42
Abhinav S18-Jul-10 6:42 
GeneralRe: inheritance of atribute. Pin
prasadbuddhika18-Jul-10 7:09
prasadbuddhika18-Jul-10 7:09 
QuestionProblem to update hierarchical data and display it in treeView. Pin
hdv21217-Jul-10 22:27
hdv21217-Jul-10 22:27 
AnswerRe: Problem to update hierarchical data and display it in treeView. Pin
Mycroft Holmes18-Jul-10 14:44
professionalMycroft Holmes18-Jul-10 14:44 
GeneralRe: Problem to update hierarchical data and display it in treeView. Pin
hdv21220-Jul-10 11:42
hdv21220-Jul-10 11:42 
Generalprogram c# Pin
danhco17-Jul-10 22:14
danhco17-Jul-10 22:14 
GeneralRe: program c# Pin
OriginalGriff17-Jul-10 22:30
mveOriginalGriff17-Jul-10 22:30 
QuestionHow can I syncronize paint events from different controls? Pin
Steven Solberg17-Jul-10 3:39
Steven Solberg17-Jul-10 3:39 
AnswerRe: How can I syncronize paint events from different controls? Pin
Luc Pattyn17-Jul-10 4:02
sitebuilderLuc Pattyn17-Jul-10 4:02 
GeneralRe: How can I syncronize paint events from different controls? Pin
Steven Solberg17-Jul-10 4:14
Steven Solberg17-Jul-10 4:14 
GeneralRe: How can I syncronize paint events from different controls? Pin
Luc Pattyn17-Jul-10 4:31
sitebuilderLuc Pattyn17-Jul-10 4:31 
GeneralRe: How can I syncronize paint events from different controls? Pin
Steven Solberg17-Jul-10 4:34
Steven Solberg17-Jul-10 4:34 
GeneralRe: How can I syncronize paint events from different controls? Pin
Luc Pattyn17-Jul-10 4:54
sitebuilderLuc Pattyn17-Jul-10 4:54 
GeneralRe: How can I syncronize paint events from different controls? [modified] Pin
Steven Solberg17-Jul-10 8:09
Steven Solberg17-Jul-10 8:09 
GeneralRe: How can I syncronize paint events from different controls? Pin
Steven Solberg22-Jul-10 22:24
Steven Solberg22-Jul-10 22:24 

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.