如何在VB6中运行sum()函数? [英] How to run sum() Function in VB6?
问题描述
大家好,
如何在VB6中运行sum()函数?
Adodc1.recordsource =" select sum(quantity )从购买
adodc1.refresh
1.)但如何检索所需文本框中的结果,如我拿了 - 可用量。文本
在某处我读到的查询就像是选择总和(数量)为SumOfQuantity from purchase
2.)在上面的语句中是什么as SumOfQuantity"
你可以帮我吗
$ b $bNE☼
Hi All,
How to run sum() Function in VB6?
Adodc1.recordsource="select sum(quantity) from purchase"
adodc1.refresh
1.) but how to retrieve result in desired text box like i took- AvailabeQuantity.Text
somewhere i read that query is like "Select sum(quantity) as SumOfQuantity from purchase"
2.) in above statement what is "as SumOfQuantity"
can you please help me
NE☼
推荐答案
大家好,
如何在VB6中运行sum()函数?
Adodc1 .recordsource =" select sum(quantity)from purchase"
adodc1.refresh
1.)但是如何检索结果所需的文本框就像我take-AvailabeQuantity.Text
在某处我读到的查询就像是选择总和(数量)为SumOfQua来自购买的ntity
2.)在上述声明中,什么是作为SumOfQuantity
你可以帮助我吗
$ b $bNE☼
Hi All,
How to run sum() Function in VB6?
Adodc1.recordsource="select sum(quantity) from purchase"
adodc1.refresh
1.) but how to retrieve result in desired text box like i took- AvailabeQuantity.Text
somewhere i read that query is like "Select sum(quantity) as SumOfQuantity from purchase"
2.) in above statement what is "as SumOfQuantity"
can you please help me
NE☼
当您执行此查询时,数量将被填充在名为SumOfQuantity的栏目中
-ansuman sahu
Hi ,
when you execute this query the quantity will be populated in the column named SumOfQuantity
-ansuman sahu
大家好,
如何在VB6中运行sum()函数?
Adodc1.recordsource ="从购买中选择总和(数量)>
adodc1.refresh
1.)但是如何检索所需文本框中的结果就像我一样 - 可用量。文本
某处我读取该查询就像选择总和(数量)为购买时的SumOfQuantity
2.)在上述声明中什么是作为SumOfQuantity
你可以帮我吗
$ b $bNE☼
Hi All,
How to run sum() Function in VB6?
Adodc1.recordsource="select sum(quantity) from purchase"
adodc1.refresh
1.) but how to retrieve result in desired text box like i took- AvailabeQuantity.Text
somewhere i read that query is like "Select sum(quantity) as SumOfQuantity from purchase"
2.) in above statement what is "as SumOfQuantity"
can you please help me
NE☼
我不确定关于adodc控件,但如果你可以改为adodb连接,那么按下面所示放下代码。
同时删除adodc和
通过单击Project - References添加引用Microsoft Active X Data objects 2.0库
现在代码
I am not sure about adodc control but if you can change to adodb connection then put down the code as below.
Also remove adodc and
add reference Microsoft Active X Data objects 2.0 library by clicking on Project--References
Now the code
谢谢Sahu,谢谢Cmrehma,
我共有4个字段我的''购买''表 - (product_id,product_name,数量,价格)
如果我使用Adodc连接,应该是总和(数量)的代码。
i已经尝试过 -
adodc1.recordsource =" select sum(quantity)从购买
adodc1.refresh
现在如何在文本框中获得结果????????
>
我想将数据检索到文本框中。这就是我想要的东西
正如你所说的Sahu,SumOfQuantity是我的结果将被填充的专栏。那么结果将如何转到数据库表?还有以列的形式?
如你所说cmrehma,原谅我,如果我拼错了你,
你说--------- - > adodc1.fields(0)
但是我找不到任何名为Fields的adodc方法。所以我收到了一个错误。
你可以解决我的需求。
$ b $bNE☼
Thank you Sahu, Thank you Cmrehma,
I have total 4 fields in my ''Purchase'' table -(product_id, product_name, quantity, price)
what should be code for sum(quantity) if i use Adodc connection.
i have tried --
adodc1.recordsource="select sum(quantity) from purchase"
adodc1.refresh
now how to get result in a text box????????
I want to retrieve data into a text box. THIS IS WHAT I WANT
as you said Sahu, SumOfQuantity is column in which my result will be populated. so how a result will go to database table? moreover in the form of column?
as you said cmrehma, forgive me if i misspelt you,
you said ---------->adodc1.fields(0)
but i dont find any method with adodc named "Fields" so I got an error.
can you please sort out my need.
NE☼
这篇关于如何在VB6中运行sum()函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!