如何在SQLServer中搜索ID以检索基于ID的图像 [英] how can i search id to retrieve a image based on id in sqlserver

查看:80
本文介绍了如何在SQLServer中搜索ID以检索基于ID的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我放置了一个按钮来搜索id.当我输入id no时,基于该id号,我们必须从数据库中获取信息,即要从该id显示的图像.

i placed a button to search a id . when i entered id no ,based on that id number we have to get the information from database i.e image to display from that id

推荐答案

我想这意味着您没有关于数据库如何工作的想法.数据库使用的语言称为SQL.您可以通过所谓的存储过程(实质上是在数据库中按名称调用的程序")或直接的SQL代码从VB调用SQL.您将编写类似
的代码
从id = @id
的图像中选择图像
然后使用参数查询或存储的proc插入id的值.
I guess this means you have no idea about how databases work. The language used by databases is called SQL. You can call SQL from VB via what''s called a stored procedure ( essentially a ''program'' that you call by name in your DB ), or by straight SQL code. You would write code like

select image from images where id = @id

and then either use a paramaterised query or a stored proc to insert the value for id.


这篇关于如何在SQLServer中搜索ID以检索基于ID的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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