从数据库获取数据并将其放入字符串或任何类型类 [英] get data from database and put it to the string or any type classess

查看:73
本文介绍了从数据库获取数据并将其放入字符串或任何类型类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我想从数据库表中获取特殊数据并将其放入任何类型的变量中!
例如,获取数据并将其放入字符串Array like:string [] d;供以后使用.
但是我不知道!以前我使用带对象控制的databinding.add()方法.但是知道我想要一种更好的方法来工作!

解决方案

您可以使用DataReader [在这里 [ ^ ]描述了如何从数据库读取blob(二进制大对象).但是您不能将检索到的数据可变地存储在 any 中,只能存储在合适的数据中.


hi i want to get special data from database table and put it to any type of variable!
for Example get data and put to the string Array like:string [] d; for later use.
but I don''t know what! in ago i used databinding.add()with object control.But know i want a better way to this working!

thank''s for answer me.

解决方案

You can retrieve data using DataReader[^] class. But I don''t know what special data means to you. Here[^] is described how to read blobs (binary large object) from databases. But you can not store retrieved data in any variably, only in a suitable one.


这篇关于从数据库获取数据并将其放入字符串或任何类型类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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