可以将数据库中的数据插入vb.net中的标签中吗? [英] Can data from database be inserted in a label in vb.net?

查看:119
本文介绍了可以将数据库中的数据插入vb.net中的标签中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在数据库中有1列货币,现在我想在运行时在标签中显示该货币。有可能吗?



例如我有1个组合框,其中有不同的货币,还有另一个amt列。

现在我想在标签而不是文本框中显示货币价值在文本框中,amt将显示,如果我拿标签,那么货币将显示从数据库获取的货币。



所以我可以在标签中显示一个值从数据库?并且它应该在运行时是动态的,就像在选择不同货币时更改值。



任何人都可以告诉我。

谢谢提前

I have 1 column currency in database, now i wanto display that currency in a label at runtime.is it possible?

e.g i have 1 combo box where different currencies are there and also another amt column.
now i want to display currency value in a lable rather than a textbox beacuse in textbox the amt will show and beside that if i take lable,then the currency will show which is fetched from database.

so can i display a value in lable fetched from database? and it should be dynamic at run time,like will change values as and when selected different currencies.

can anyone tell me.
thanks in advance

推荐答案

Label1.Text = DirectCast(row,System.Data.DataRow)(货币)。ToString()
Label1.Text = DirectCast(row, System.Data.DataRow)("currency").ToString()


这篇关于可以将数据库中的数据插入vb.net中的标签中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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