Beispiel #1
0
        private void nonSelect()
        {
            ConnNode           t_node    = (ConnNode)mainTabControlHT[tabControl1.SelectedTab.Name];
            EditorNode         e_node    = (EditorNode)t_node.subTabControlHT[t_node.sub_tabctl.SelectedTab.Name];
            AltibaseConnection a_conn    = e_node.s_editor.conn;
            DataSet            a_dataset = e_node.s_editor.dataSet1;

            String          query = e_node.s_editor.syntaxRichTextBox1.Text;
            AltibaseCommand cmd   = new AltibaseCommand(query, a_conn);
            String          split = " ";

            a_dataset.Clear();

            try
            {
                int result = cmd.ExecuteNonQuery();

                string[] query_split = query.Split(split.ToCharArray());

                foreach (string s in query_split)
                {
                    if (s.Trim() != "")
                    {
                        setMsg((String)s, result);
                        break;
                    }
                }
                setHistory();
            }
            catch (Exception ex)
            {
                setErrMsg(ex);
            }
        }
Beispiel #2
0
        public override DbCommand XDbCommand()
        {
            DbCommand cmd = null;

            if (ConnType == XDbConnType.ORACLE)
            {
                cmd = new OracleCommand();
            }
            else if (ConnType == XDbConnType.ALTIBASE)
            {
                cmd = new AltibaseCommand();
            }
            else if (ConnType == XDbConnType.MSSQL)
            {
                cmd = new SqlCommand();
            }
            else if (ConnType == XDbConnType.TIBERO)
            {
                cmd = new OleDbCommandTbr();
            }
            else if (ConnType == XDbConnType.OLEDB)
            {
                cmd = new OleDbCommand();
            }

            if (cmd is OracleCommand cmd_)
            {
                //TODO: 설정으로 처리 ( 현재는 용도는 없다 )
                //cmd_.InitialLOBFetchSize = 4000;
                cmd_.InitialLONGFetchSize = 4000;
            }

            return(cmd);
        }