如何从MSSQL检索单行 [英] How to retrieve single row from MSSQL

查看:42
本文介绍了如何从MSSQL检索单行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生您好,

先生,我已经在MSSQL中创建了表格,其中包含患者姓名,pid,Dname(医生姓名),技术人员姓名.这里包含了表中的四个名称.我已经在GUI中创建了患者姓名,医生姓名和搜索按钮我要的是给病人和病人的名字后医生,然后单击搜索按钮.它必须相应地显示患者详细信息,该信息显示在他的行中.我的意思是只需要在同一窗口的下一个Jpanel中显示他的行.我在Eclipse中的MSSQL,GUI中创建了表.如何实现..


在这方面帮助我..


谢谢&问候
Pradeep

Hello sir,

Sir i had created the table in MSSQL,the fields with patient name,pid,Dname(doctor name),technician name.Here it contains say four names in the table.I had created the patient name and doc name and search button in GUI window.What i want is after giving the name of both patient & doctor,after clicking the search button.It has to display patient details accordingly,that what is present in his row.I mean only his row has to be displayed in the next Jpanel within same window.I created table in MSSQL,GUI in eclipse.How to achieve it..


Help me in this regard..


Thanks & Regards
Pradeep

推荐答案

无需再次发布相同的问题-您只需在原始问题中回答即可:

将单行从MSSQL检索到GUI窗口 [ ^ ]

我已经发布了2个链接.阅读那里写的东西.您需要将程序连接到数据库-您可以为此使用JDBC(网络链接2).建立连接后,您将需要向数据库查询所需的数据. Weblink 1中介绍了如何创建该查询.

我还建议购买一本有关常规Java编程的书.它的优点是您不需要知道在哪里搜索.大多数Java书籍都涵盖了通过JDBC与数据库的连接.
No need to post the same question again - you could simply answer in the original question:

Retrieving the single row from MSSQL into the GUI window[^]

I have posted 2 links. Read what is written there. You need to connect your program to the database - you can use JDBC for that (weblink 2). After you have established the connection you will need to ask the database for the desired data. How to create that query is described in weblink 1.

I also recommend to buy a book about general java programming. It''s got the advantage that you do not need to know where to search. Most Java books cover the connection to a database via JDBC.


这篇关于如何从MSSQL检索单行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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