首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何通过perl连接infobright DB?

如何通过perl连接infobright DB?
EN

Stack Overflow用户
提问于 2011-04-04 16:35:38
回答 5查看 999关注 0票数 1

如何通过perl连接infobright DB?

EN

回答 5

Stack Overflow用户

发布于 2011-04-04 17:40:27

DBD-mysql在一起。使用以下命令安装

代码语言:javascript
复制
perl Makefile.PL --mysql_config=/usr/local/infobright-3.5.2-x86_64/bin/mysql_config

或者类似的。

票数 2
EN

Stack Overflow用户

发布于 2011-04-04 21:51:50

您可以使用与MySQL一起使用的任何标准数据库连接来连接到Infobright。Daxim是正确的-- DBD是连接到数据库的最常见的方法之一。在您的DBD配置中,您需要做的就是将端口号从3306 (MysQL)更改为5029 (Infobright)。其余的都是一样的。

票数 1
EN

Stack Overflow用户

发布于 2016-05-02 00:36:28

**插入**

代码语言:javascript
复制
if (textBox4.Text == "")
  {
    MessageBox.Show("Please provide Selling1 ", "Item Update", MessageBoxButtons.OK);
            textBox4.Focus();
            return;
        }

        int i = dbcon.writer("insert into Item_Master(Item_Code,Name,Description,Selling1,Selling2,Reorder_level,Reorder_Quantity,Active) Values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text + "','" + textBox8.Text + "')");

        if (i == 1)
        {


            MessageBox.Show("Record added succesfully", "Item Table");
            Itemview();//disply ll 
           iclear();
        }
        else
        { MessageBox.Show("Record unsuccesfully for Item "); }

    }

**插入**

代码语言:javascript
复制
Dbcontrol dbcon = new Dbcontrol();
    SqlDataReader dr = null;
string date = DateTime.Now.ToString("M/d/yyyy");

查看/搜索

代码语言:javascript
复制
   listView1.Items.Clear();
        dr = dbcon.reader("select cateid,brand,type,deta,date from emcategory where cateid like '%" + txtseacrchid.Text + "%'");

        while (dr.Read())
        {
            string sid = dr["cateid"].ToString();
            string id = dr["brand"].ToString();
            string pname = dr["type"].ToString();
            string dis = dr["deta"].ToString();
            string tim = dr["date"].ToString();
            string[] row = { sid, id, pname, dis, tim };
            var listViewItem = new ListViewItem(row);
            listView1.Items.Add(listViewItem);

        }

查看/搜索*

**更新**

代码语言:javascript
复制
     try
        {
            DialogResult x = MessageBox.Show("Do You Really Want To Update This Record", "Cash Book Details", MessageBoxButtons.YesNo);

            if (x == DialogResult.Yes)
            {
                upate.Enabled = true;
                delete.Enabled = false;
                foreach (ListViewItem item in listView1.SelectedItems)
                {

                    txtid.Text = item.SubItems[0].Text;
                    txtBrand.Text = item.SubItems[1].Text;
                    txttyp.Text = item.SubItems[2].Text;
                    txtdec.Text = item.SubItems[3].Text;


                }


            }


        }


        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);

        }

**更新**

删除

代码语言:javascript
复制
DialogResult x = MessageBox.Show("Do You Really Want To Delete This Record", "Item Category", MessageBoxButtons.YesNo);

        if (x == DialogResult.Yes)
        {
            delete.Enabled = true;
            int i = dbcon.writer("delete from Ritemcategory where cateid='" + txtid.Text + "'");

            if (i == 2 || i == 1)
            {
                MessageBox.Show("Deleted Succesfully", "Item Category");
                view();

                generatePid();


            }

        }
        else
        {
            delete.Enabled = false;

        }

删除

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5536222

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档