Click here to Skip to main content
15,844,752 members
Home / Discussions / C#
   

C#

 
AnswerRe: run c# application on solaris Pin
Michael Sync3-Jul-07 21:39
Michael Sync3-Jul-07 21:39 
AnswerRe: run c# application on solaris Pin
Vasudevan Deepak Kumar3-Jul-07 23:02
Vasudevan Deepak Kumar3-Jul-07 23:02 
Questionhow can i read/write data to excel 2007 with C#.net consolde application? Pin
neodeaths3-Jul-07 20:57
neodeaths3-Jul-07 20:57 
AnswerRe: how can i read/write data to excel 2007 with C#.net consolde application? Pin
Jimmanuel4-Jul-07 11:25
Jimmanuel4-Jul-07 11:25 
QuestionPassing Custom control Properties in Query String Pin
SivabalanK3-Jul-07 20:56
SivabalanK3-Jul-07 20:56 
AnswerRe: Passing Custom control Properties in Query String Pin
Michael Sync3-Jul-07 21:02
Michael Sync3-Jul-07 21:02 
QuestionRunning a T-SQL script file using C# Pin
wasife3-Jul-07 20:49
wasife3-Jul-07 20:49 
AnswerRe: Running a T-SQL script file using C# Pin
Michael Sync3-Jul-07 20:59
Michael Sync3-Jul-07 20:59 
try the following code from this post. http://blog.miseldine.com/?p=24

<br />
private static void ExecuteSql(SqlConnection ___conn, string ___fileName)<br />
{<br />
    //array for storage of SQL<br />
    string[] __sqlStatements;<br />
    //the only clever bit: spilt at each GO statement<br />
    //as the normal SQL connector will spit out anything<br />
    //after the GO.<br />
    Regex __r = new Regex("^GO", RegexOptions.Multiline);<br />
<br />
    //for file reading: just replace with the string of<br />
    //SQL if not from file. Or embed SQL as resource…<br />
    StreamReader __sr = new StreamReader(___fileName);<br />
    string __sql = __sr.ReadToEnd();<br />
    __sqlStatements = __r.Split(__sql);<br />
    SqlCommand __comm = new SqlCommand();<br />
    __comm.Connection = ___conn;<br />
<br />
    //loop through each block in the spilt SQL and<br />
    //execute.<br />
    foreach (string __sqlBlock in __sqlStatements)<br />
    {<br />
        if (__sqlBlock.Trim().Length > 0)<br />
        {<br />
            __comm.CommandText = __sqlBlock;<br />
<br />
            try<br />
            {<br />
                __comm.ExecuteNonQuery();<br />
            }<br />
            catch (SqlException)<br />
            {<br />
                //here, execute your DROP script<br />
                break;<br />
            }<br />
        }<br />
    }<br />
}<br />

thks to original author.

here is another one... http://msdn2.microsoft.com/en-us/library/ms811086.aspx

Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. Smile | :)

AnswerRe: Running a T-SQL script file using C# Pin
Colin Angus Mackay3-Jul-07 23:31
Colin Angus Mackay3-Jul-07 23:31 
Questioninstaller package Pin
DKalepu3-Jul-07 20:28
DKalepu3-Jul-07 20:28 
AnswerRe: installer package Pin
wasife3-Jul-07 20:46
wasife3-Jul-07 20:46 
GeneralRe: installer package Pin
DKalepu3-Jul-07 21:15
DKalepu3-Jul-07 21:15 
Questioncalling a super class method from a derived class Pin
Kanjinghat3-Jul-07 19:31
Kanjinghat3-Jul-07 19:31 
AnswerRe: calling a super class method from a derived class Pin
Sathesh Sakthivel3-Jul-07 20:05
Sathesh Sakthivel3-Jul-07 20:05 
GeneralRe: calling a super class method from a derived class Pin
Kanjinghat3-Jul-07 20:15
Kanjinghat3-Jul-07 20:15 
GeneralRe: calling a super class method from a derived class [modified] Pin
Martin#3-Jul-07 20:50
Martin#3-Jul-07 20:50 
GeneralRe: calling a super class method from a derived class Pin
Kanjinghat3-Jul-07 21:24
Kanjinghat3-Jul-07 21:24 
GeneralRe: calling a super class method from a derived class Pin
Martin#4-Jul-07 6:46
Martin#4-Jul-07 6:46 
AnswerRe: calling a super class method from a derived class Pin
PIEBALDconsult3-Jul-07 20:54
mvePIEBALDconsult3-Jul-07 20:54 
QuestionDataGridView Pin
sangramkp3-Jul-07 19:19
sangramkp3-Jul-07 19:19 
AnswerRe: DataGridView Pin
Gopal.S4-Jul-07 2:40
Gopal.S4-Jul-07 2:40 
GeneralRe: DataGridView Pin
sangramkp4-Jul-07 3:42
sangramkp4-Jul-07 3:42 
QuestionRead StatusStrip Text from Another Program Pin
anamorphism3-Jul-07 16:10
anamorphism3-Jul-07 16:10 
AnswerRe: Read StatusStrip Text from Another Program Pin
Michael Sync3-Jul-07 18:14
Michael Sync3-Jul-07 18:14 
GeneralRe: Read StatusStrip Text from Another Program Pin
anamorphism3-Jul-07 20:43
anamorphism3-Jul-07 20:43 

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.