将结果添加到数据集 [英] add results to dataset

查看:96
本文介绍了将结果添加到数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我撞墙了,我被卡住了。我有一个带有文本框的web表单

用户可以输入1到多个用户名,然后用户必须验证

用户以确保用户存在。我有一个存储过程,只能

一次只能占用一个用户名,所以我需要继续调用这个存储过程

与文本框中的所有用户名(i有这部分工作)。我遇到的

问题是,只有最后一个用户名的数据传递给

存储过程正在传回,所以如果我输入


JSmith,SLong,SHenry,

所有3个用户的
详细信息,所以我可以将它们添加到用户表中。


所以当我点击添加按钮时,它的存储:

JSmith,SLong,SHenry在表的用户栏中存储SHENry,

电话号码,电子邮件地址等。我需要为每个用户提供一行自己的

信息

所以我要么以某种方式继续将其添加到现有数据集中,或者

somethign。


有关如何做的任何建议这是什么?

Ok, I hit a wall and I''m stuck. I have a web form that has a textbox were
the user can enter in 1 to many usernames, then the user has to validate the
user to make sure the user exists. I have a stored procedure that can only
take one username at a time, so I need to keep calling this stored procedure
with all of the usernames in the textbox( i have this portion working). The
issue I''m running into is that only the data for the last username passed to
the stored procedure is being passed back so if I enter in

JSmith, SLong, SHenry,

I''m only getting the details for SHenry, though I need to store and use the
details for all 3 users so I can add them to the user table.

so when I click the add buttong, its storing:
JSmith, SLong, SHenry in the user column of the table BUT storing SHenry,
phone number, email address etc. I need a row for each user with their own
information
So I either need somehow to keep adding it to the existing dataset or
somethign.

any suggestions on how to do this?

推荐答案

7月11日下午4:55,史蒂夫 < S ... @ community.nospam.comwrote:
On Jul 11, 4:55 pm, "Steve" <S...@community.nospam.comwrote:

好​​的,我撞墙了,我被卡住了。我有一个带有文本框的web表单

用户可以输入1到多个用户名,然后用户必须验证

用户以确保用户存在。我有一个存储过程,只能

一次只能占用一个用户名,所以我需要继续调用这个存储过程

与文本框中的所有用户名(i有这部分工作)。我遇到的

问题是,只有最后一个用户名的数据传递给

存储过程正在传回,所以如果我输入


JSmith,SLong,SHenry,

所有3个用户的
详细信息,所以我可以将它们添加到用户表中。


所以当我点击添加按钮时,它的存储:

JSmith,SLong,SHenry在表的用户栏中存储SHENry,

电话号码,电子邮件地址等。我需要为每个用户提供一行自己的

信息


所以我要么以某种方式继续将其添加到现有数据集中,或者

somethign。


任何建议关于怎么做?
Ok, I hit a wall and I''m stuck. I have a web form that has a textbox were
the user can enter in 1 to many usernames, then the user has to validate the
user to make sure the user exists. I have a stored procedure that can only
take one username at a time, so I need to keep calling this stored procedure
with all of the usernames in the textbox( i have this portion working). The
issue I''m running into is that only the data for the last username passed to
the stored procedure is being passed back so if I enter in

JSmith, SLong, SHenry,

I''m only getting the details for SHenry, though I need to store and use the
details for all 3 users so I can add them to the user table.

so when I click the add buttong, its storing:
JSmith, SLong, SHenry in the user column of the table BUT storing SHenry,
phone number, email address etc. I need a row for each user with their own
information

So I either need somehow to keep adding it to the existing dataset or
somethign.

any suggestions on how to do this?



我们能看到存储过程的代码吗?

Can we see the code of the stored procedure?


存储过程实际上是一个select语句,它调用一个视图,即

在表上执行select,join等操作。

但存储过程是


select * from vGetUserInformation,其中ID = @id


并且视图正在完成所有工作

" Alexey Smirnov" < al ************ @ gmail.comwrote in message

news:11 ****************** ****@k79g2000hse.googlegr oups.com ...
the stored procedure is actually a select statement that calls a view which
is doing a select, joins, etc on tables.
but the stored procedure is

select * from vGetUserInformation where ID = @id

and the view is doing all of the work
"Alexey Smirnov" <al************@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...

7月11日下午4:55,Steve < S ... @ community.nospam.comwrote:
On Jul 11, 4:55 pm, "Steve" <S...@community.nospam.comwrote:

>好的,我撞墙了,我被卡住了。我有一个带有文本框的Web表单,用户可以输入1到多个用户名,然后用户必须验证
用户以确保用户存在。我有一个存储过程,只能一次只取一个用户名,所以我需要继续使用文本框中的所有用户名调用这个存储的
程序(i这部分工作了。
我遇到的问题是,只有最后一个用户名的数据传递给存储过程的数据正在传回,所以如果我进入了

JSmith,SLong,SHenry,

我只是得到了SHenry的详细信息,虽然我需要存储和使用
所有3个用户的详细信息,以便我可以将它们添加到用户表中。

所以当我点击添加按钮时,它存储:
JSmith,SLong,SHenry在用户列中表,但存储SHENRY,
电话号码,电子邮件地址等。我需要为每个用户提供一行他们自己的
信息

所以我要么以某种方式继续将它添加到现有数据集或
somethign。

有关如何执行此操作的任何建议?
>Ok, I hit a wall and I''m stuck. I have a web form that has a textbox were
the user can enter in 1 to many usernames, then the user has to validate
the
user to make sure the user exists. I have a stored procedure that can
only
take one username at a time, so I need to keep calling this stored
procedure
with all of the usernames in the textbox( i have this portion working).
The
issue I''m running into is that only the data for the last username passed
to
the stored procedure is being passed back so if I enter in

JSmith, SLong, SHenry,

I''m only getting the details for SHenry, though I need to store and use
the
details for all 3 users so I can add them to the user table.

so when I click the add buttong, its storing:
JSmith, SLong, SHenry in the user column of the table BUT storing SHenry,
phone number, email address etc. I need a row for each user with their
own
information

So I either need somehow to keep adding it to the existing dataset or
somethign.

any suggestions on how to do this?



我们可以看到存储过程的代码吗?


Can we see the code of the stored procedure?



On 7月11日,下午7:45,史蒂夫 < S ... @ community.nospam.comwrote:
On Jul 11, 7:45 pm, "Steve" <S...@community.nospam.comwrote:

存储过程实际上是一个调用视图的select语句

在表上进行选择,连接等。

但存储过程是


select * from vGetUserInformation其中ID = @id


并且视图正在完成所有工作
the stored procedure is actually a select statement that calls a view which
is doing a select, joins, etc on tables.
but the stored procedure is

select * from vGetUserInformation where ID = @id

and the view is doing all of the work



嗯,那么这就是我想的代码......需要看看它:-)

Well, then it''s something the code I guess... Need to see it :-)


这篇关于将结果添加到数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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