读取数据表值 [英] read datatable value

查看:68
本文介绍了读取数据表值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello,
my datatable returns a row with several fields.
I can refer to all the field values except one of them which returns blank.
In immediate window it returns : dt.Rows[0]["Quarter"]
{}
Even if I refer to it by index number, it returns the same thing i.e. empty value

I can see in the stored proc it does return a value for field "Quarter"

Do you know what I am doing wrong?

推荐答案

In immediate window it returns : dt.Rows[0]["Quarter"]
{}



表示dt.Rows [0] [Quarter]包含空值。

见表并查看值。


it means dt.Rows[0]["Quarter"] contains null value.
see in table and check the value.


通过更改数据类型解决。

不确定原因。
无论如何。
Solved by changing the datatype.
Not sure why.
Thank anyway.


这篇关于读取数据表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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