TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Leonard Willian Prens Herrera
NA
1
6.7k
foreach statement cannot operate on variables of type 'int' because 'int' does not contain a public definition for 'GetEnumerator'
Nov 2 2012 5:02 PM
My Code
private
void
button3_Click(
object
sender,
EventArgs
e)
{
var
query_05 = kn_01.Sp_prueba_00(txt_server.Text, txt_database.Text, txt_table.Text);
foreach
(
var
item_21
in
query_05)
{
dt_apellidos.Rows.Add(item_21);
}
}
//Strore Procedure
Create
procedure
Sp_prueba_00
(
@Servidor_source
varchar
(
50
),
@Database_Source
varchar
(
50
),
@Table_Source
varchar
(
50
)
)
as
Declare
@sql
varchar
(
max
)
set
@sql
=
'select * '
+
' from ['
+
(
@Servidor_source
)
+
'].['
+
(
@Database_Source
)
+
'].dbo.'
+
(
@Table_Source
)
execute
(
@sql
)
return
0
Reply
Answers (
1
)
LINQ to SQL Thread safety
Convert the code from Stroed procedure to Linq