在C#中从SQL数据库检索信息 [英] Retrieving information from sql database in C#

查看:97
本文介绍了在C#中从SQL数据库检索信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.
我有两个基于SQL Server的数据库,分别名为 exerciseTable picFullTable .在 exerciseTable 中,我有两个char列,分别命名为 ID exerciseName .在 picFullTable 中,我有一些列.第一列为char并命名为 ID ,第二列为名为 pic 的图像列.两个表中的 ID 相似,并且图片在图像列中另存为 binary [] .

我想通过调用每个练习的 名称来检索图片并将图片显示在pictureBox中.

请帮助我.

Hi.
I got two sql server based databases named exerciseTable and picFullTable. In exerciseTable I have two char columns named ID and exerciseName. In picFullTable I have columns. First column is char and named ID and second one is an image column called pic. The ID in both tables are similar and the pictures are saved as binary[] in image column.

I want to retrieve pictures by calling the name of each exercise and display the picture in a pictureBox.

Help me please.

推荐答案


通过此链接可以解释所有内容-
使用Streded Procedures和C#.net从SQL Server存储和检索图像 [ ^ ]
Hi,
Go through this link it explains everything-
Storing and Retrieving Images from SQL Server Using Strored Procedures and C#.net[^]


当前真正的问题是什么?希望您不要让别人为您编写一个可以满足您所有需求的应用程序.

如果您只关注使您无法继续前进的问题,那么您可以期待得到答案.到目前为止,您的问题太含糊了.
What is the real question at hand? I hope you are not asking someone to write an application for you that does everything you need.

If you just focus on the problem that stops you from going any further, then you can expect an answer. So far your question is far too vague.


这篇关于在C#中从SQL数据库检索信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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