C#Windows基本应用程序中的MS Access查询 [英] MS Access query in C# windows base application

查看:50
本文介绍了C#Windows基本应用程序中的MS Access查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在使用C#Windows基本程序,数据库是MS Access.我必须获取一个数据类型为Currency的值,但是我无法从表中检索数据
下面我给出了代码-

Hi All,
I am using C# windows base program and database is MS Access.I have to get a value which data type is Currency but I m not able to retrieve the data from the table
below I given the code--

private void calc()
        {
            double price;
            string str;
      //here I m suppose to get the particular "unitprice" data which is Currency type
            str = "Select unitprice from partmaster where partnumber=" + cmbPartNo.SelectedItem.ToString();
            OleDbCommand cmd = new OleDbCommand(str,con);
            OleDbDataAdapter da = new OleDbDataAdapter();
            da.SelectCommand = cmd;
}


感谢All


Thanks to All

推荐答案

Hello Indrajit,

我想建议您阅读
单击此处 [
Hello Indrajit,

I like to suggest you please go through with
Click here[^] this before any furthur development. trust me you''ll not require help on this after understanding the topic.
try to learn from the link.

thanks
sanjeev
if any doubt let me know.


这篇关于C#Windows基本应用程序中的MS Access查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆