Click here to Skip to main content
16,006,348 members
Home / Discussions / C#
   

C#

 
GeneralRe: handled files Pin
lost_in_code1-Apr-09 0:39
lost_in_code1-Apr-09 0:39 
AnswerRe: handled files Pin
0x3c01-Apr-09 0:44
0x3c01-Apr-09 0:44 
GeneralRe: handled files Pin
lost_in_code1-Apr-09 0:58
lost_in_code1-Apr-09 0:58 
QuestionDataGridView.RowFilter question Pin
kanchoette31-Mar-09 23:51
kanchoette31-Mar-09 23:51 
AnswerRe: DataGridView.RowFilter question Pin
Eddy Vluggen31-Mar-09 23:59
professionalEddy Vluggen31-Mar-09 23:59 
AnswerRe: DataGridView.RowFilter question Pin
vinodkrebc1-Apr-09 1:24
vinodkrebc1-Apr-09 1:24 
QuestionExecuting PL/Sql Anonymous block from ADO Pin
Muammar©31-Mar-09 23:27
Muammar©31-Mar-09 23:27 
AnswerRe: Executing PL/Sql Anonymous block from ADO Pin
Muammar©1-Apr-09 2:46
Muammar©1-Apr-09 2:46 
Just found another way round by generating the desired script file, storing it in a temporary file and execute it from SQLPLUS. Here's how:

string strSEQ = 
@"DECLARE
N NUMBER(10);
BEGIN
    SELECT MAX(ID)+1 INTO N FROM "+ strTableName +@";
-- CREATING SEQUENCE
Execute immediate ('DROP SEQUENCE SEQ_TEMP');
Execute immediate ('CREATE SEQUENCE SEQ_TEMP
    MINVALUE 1
    START WITH '||N||'
    INCREMENT BY 1
    CACHE 20
    ORDER');
END;
/
";

                
                //Writing a script file and executing it
                string strTempFile = Environment.GetEnvironmentVariable("TEMP")+"\\tmp_SCRIPT.SQL";
                string CR = "\r\n";

                System.IO.StreamWriter sw;

                System.Diagnostics.Process p = new System.Diagnostics.Process();
                p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
                p.StartInfo.CreateNoWindow = true;
                p.EnableRaisingEvents = true;
                p.Exited += new System.EventHandler(p_Exited);

                p.StartInfo.FileName = @"SQLPLUS.exe";
                

                //Writing Script File
                sw = new System.IO.StreamWriter(strTempFile);
                sw.Write(strSEQ);
                sw.Flush();
                sw.Close();

                p.StartInfo.Arguments = @"USERNAME/PASSWORD @" + strTempFile + "  >> " + 
                strTempFile.Replace(".sql",".log");
                p.Start();
            }

            private void p_Exited(object sender, EventArgs e)
            {
                MessageBox.Show("Done");
            }



All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)

QuestionHow to lock the adjustment of column runtime. Pin
saksp31-Mar-09 23:14
saksp31-Mar-09 23:14 
AnswerRe: How to lock the adjustment of column runtime. Pin
Eddy Vluggen1-Apr-09 0:21
professionalEddy Vluggen1-Apr-09 0:21 
AnswerRe: How to lock the adjustment of column runtime. Pin
vinodkrebc1-Apr-09 1:26
vinodkrebc1-Apr-09 1:26 
Questionis sending data over a same socket possible Pin
Mubeen.asim31-Mar-09 23:10
Mubeen.asim31-Mar-09 23:10 
AnswerRe: is sending data over a same socket possible Pin
stancrm31-Mar-09 23:13
stancrm31-Mar-09 23:13 
GeneralRe: is sending data over a same socket possible Pin
Mubeen.asim31-Mar-09 23:33
Mubeen.asim31-Mar-09 23:33 
QuestionDirectory.Exist Pin
yesu prakash31-Mar-09 22:55
yesu prakash31-Mar-09 22:55 
AnswerRe: Directory.Exist Pin
Tom Deketelaere31-Mar-09 23:33
professionalTom Deketelaere31-Mar-09 23:33 
AnswerRe: Directory.Exist Pin
0x3c01-Apr-09 0:53
0x3c01-Apr-09 0:53 
QuestionWhat exceptions cannot be caught by try-catch block? Pin
devvvy31-Mar-09 22:04
devvvy31-Mar-09 22:04 
AnswerRe: What exceptions cannot be caught by try-catch block? Pin
Pete O'Hanlon31-Mar-09 22:25
mvePete O'Hanlon31-Mar-09 22:25 
GeneralRe: What exceptions cannot be caught by try-catch block? Pin
moon_stick31-Mar-09 22:58
moon_stick31-Mar-09 22:58 
GeneralRe: What exceptions cannot be caught by try-catch block? [modified] Pin
devvvy31-Mar-09 23:05
devvvy31-Mar-09 23:05 
GeneralRe: What exceptions cannot be caught by try-catch block? Pin
moon_stick31-Mar-09 23:35
moon_stick31-Mar-09 23:35 
GeneralRe: What exceptions cannot be caught by try-catch block? Pin
devvvy1-Apr-09 0:13
devvvy1-Apr-09 0:13 
GeneralRe: What exceptions cannot be caught by try-catch block? Pin
devvvy1-Apr-09 0:38
devvvy1-Apr-09 0:38 
GeneralRe: What exceptions cannot be caught by try-catch block? Pin
devvvy1-Apr-09 3:14
devvvy1-Apr-09 3:14 

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.