问题描述
在我的应用程序中,我有超过160个字段,我想让用户选择几个字段,然后他可以将数据从excel导入数据库。
我怎样才能达到相同的效果我不想创建一个包含160个参数的过程,然后在存储过程中管理转换。
有没有动态的方法呢?通过它我可以管理事物而不给出160个参数。
我尝试过的事情:
我能想到的解决方案是创建一个包含160个参数的过程,并有1个表来映射参数和excel列,然后将数据插入数据库。
In my application, I have more than 160 fields, I want to enable user to select few of fields and then he can import data from excel to database.
How can I achieve the same as I don't want to create a procedure with 160 parameters and then managing transformation within stored proc.
Is there any dynamic way of doing this? Through which I can manage things without giving 160 parameters.
What I have tried:
The solution which I can think of is to create a procedure with 160 parameters and have 1 table which will map the parameters and excel column and then insert data into database.
推荐答案
这篇关于动态地将记录从Excel导入到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!