我们如何在运行时创建表 [英] How can we create table at runtime

查看:97
本文介绍了我们如何在运行时创建表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hiii,

我正在创建一个网站,其中我添加了一个页面,接受用户的其他详细信息,我想在另一个名为附加页面的页面中显示。因此,为了在数据库中保存这些细节,我不了解如何创建表并根据用户填写的其他详细信息在运行时插入动态更新的数据。



例如:



如果用户输入以下数据,如下所示:



附加详情



[通过号码。驾驶l。 ID.no]





表格应动态生成,包含输入的以下详细信息。



可能有额外的细节可能会被添加或删除的可能性,那么在这种情况下,表应该使用以下必需的数据自动更新.Plz为我提供sql查询和C#代码class =h2_lin>解决方案

您可以创建一个包含3列EmployeeID,AdditionalDetailsName和AdditionalDetailValue的表。



当用户和用户时添加新的其他详细信息,将其添加为此表中的行。您可以使用EmployeeID在其他详细信息页面上显示它们。


Hiii,
I am creating a website in which I added a page accepting additional details from the user which i want to show in the other page named additional page. So to save these details in the database I don't understand how to create the table and insert the data getting updated dynamically at runtime according to the additional details being filled by the user.

for eg:

if the user enters the following data as shown under :

ADDITIONAL DETAILS

[pass no. driving l. ID.no]


the table should generate dynamically containing the following details being entered.

there may be the possibilities that the additional details may get the added or deleted so then in that case the table should get auto updated with the following required data.Plz provide me sql query and C# code for this

解决方案

You can Create a table with 3 columns EmployeeID, AdditionalDetailsName and AdditionalDetailValue.

And as and when user add new additional details, add them as rows in this table. You retrive them using EmployeeID to show on Additional Details page.


这篇关于我们如何在运行时创建表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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