如何在WINDOWS形式中编写用于选择记录和插入以及更新数据库记录的子信息 [英] HOW TO WRITE A SUBQUERY FOR SELECTING A RECORD AND FOR INSERTING AND FOR UPDATING THE RECORD IN DATABASE IN WINDOWS FORMS

查看:88
本文介绍了如何在WINDOWS形式中编写用于选择记录和插入以及更新数据库记录的子信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI首先祝新年快乐。

HI First of all happy new year to every one.

我正在开发一个Windows应用程序我想从数据库中选择一条记录,该表几乎包含90列现在我想从该表中选择一条记录 现在我想将seelcted记录插入同一个表中的新行。我的windows
表单包含8个文本框,我希望通过从表单中的4个文本框字段中取4个值来更新新插入记录中的4列。此时我被卡住了。任何人都可以帮我如何在我的Windows窗体中写一个完美的查询
代码。

I am working on a windows application i want to select a record from the database  that table contains nearly 90 columns now i want to select a record from that table  now i want to insert the seelcted record in a new row in the same table.My windows form contains  8 text boxes and in that i want to update 4 columns in the newly inserted record by taking the 4 values from the 4 textboxes fields in the form.I was stucked at this point. Can anyone help me how to write a perfect query in my windows form code.

谢谢和问候,

Dileep.K 

Dileep.K 

推荐答案

新年快乐,Dileep!

Happy New Year, Dileep!

你已经完成了多少这项工作?您是否能够连接到数据库并从数据库表中获取数据?您是将数据放入DataSet / DataTable还是使用Entity Framework,或者只是将数据放入类或
集合或列表?你在数据绑定你的TextBoxes?如果是这样,怎么样?如果没有,为什么不呢?

How much of this have you already done? Are you able to connect to the database and get data from the database table? Are you putting that data into a DataSet/DataTable or are you using Entity Framework or are you simply putting the data into a class or a collection or a List? Are you databinding your TextBoxes? If so, how? If not, why not?

我认为你应该展示一些答案 my
的问题。我们将能够通过 您的
问题为您提供更好的帮助。

I think you should show some code that answers my questions. We'll be able to help you better with your questions.


这篇关于如何在WINDOWS形式中编写用于选择记录和插入以及更新数据库记录的子信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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