如何使用以下类进行插入,从c#中的数据库中检索数据 [英] how to use the following class for the insertion,data retrieve from the database in c#

查看:113
本文介绍了如何使用以下类进行插入,从c#中的数据库中检索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

public DataSet GetData(string Query)
        {
            try
            {
                if (ds.Tables.Count > 0)
                {
                    ds.Tables.Clear();
                }
                SqlDataAdapter adp = new SqlDataAdapter(Query, con);
                adp.Fill(ds, "s");
                return ds;
            }
            catch (Exception) 
            {
                throw;
                return ds; 
            }

        }

推荐答案

正如ThePhantomUpvoter所提到的,请阅读编程书。< br $> b $ b

看看这里:

为初学者使用ADO.NET [ ^ ]

初学者理解ADO.NET的教程 [ ^ ]

ADO.NET的开发者指南 [ ^ ]

欢迎来到ADO.NET& C#Corner 的数据库编程部分[ ^ ]
As ThePhantomUpvoter mentioned, please, read the programming book.

Have a look here:
Using ADO.NET for beginners[^]
A Beginner's Tutorial for Understanding ADO.NET[^]
Beginner's Guide to ADO.NET[^]
Welcome to ADO.NET & Database programming section of C# Corner[^]


查看此视频教程还



http://csharp-station.com/Tutorial/AdoDotNet [ ^ ]

http:// www。 dotnetfunda.com/tutorials/videos/showcatvideos.aspx?category=47 [ ^ ]



谢谢

--RA
See this Video tutorials also

http://csharp-station.com/Tutorial/AdoDotNet[^]
http://www.dotnetfunda.com/tutorials/videos/showcatvideos.aspx?category=47[^]

Thanks
--RA

这篇关于如何使用以下类进行插入,从c#中的数据库中检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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