|
-
Feb 10th, 2004, 05:18 PM
#1
Thread Starter
Member
Translation please
Hi!
I need some help...
I have just begun to use .NET and now i need som translations between ASP and ASP.NET VB
In the old fashion way you could use
Code:
Set rst=Con.Execute(SQL)
Do until rst.EOF
rst .MoveNext
loop.
What is the oposit code for the do part in ASP.NET
and this code i ASP
Code:
If rst.EOF then
' some code
else
' some code
end if
and finally
[CODE]
IF rst("IDnumer") = 15 then
' some code
end if
I will be greatful for any help, but i am new at .NET som i need simple explenations
/tyson
-
Feb 10th, 2004, 06:16 PM
#2
Addicted Member
Re: Translation please
Originally posted by tyson
Code:
Set rst=Con.Execute(SQL)
Do until rst.EOF
rst .MoveNext
loop.
Code:
foreach(DataRow myrow in mytable)
{
// todo
}
What is the oposit code for the do part in ASP.NET
and this code i ASP
Code:
If rst.EOF then
' some code
else
' some code
end if
No such thing , don't need to worry about eof any more
and finally
Code:
IF rst("IDnumer") = 15 then
' some code
end if
Code:
if(myrow["IDNumber"] == 15)
{
//todo
}
I will be greatful for any help, but i am new at .NET som i need simple explenations
/tyson
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
-
Feb 10th, 2004, 06:46 PM
#3
Thread Starter
Member
ok... but if i want to use a similar function as
If rst.EoF then
else
end if
/Tyson
-
Feb 10th, 2004, 06:55 PM
#4
Addicted Member
There is no such thing as EOF.
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
-
Feb 10th, 2004, 06:58 PM
#5
Addicted Member
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
-
Feb 11th, 2004, 11:27 AM
#6
Here I'm using a datareader object to illustrate one way of doing this...
VB Code:
drSQL = .ExecuteReader(CommandBehavior.CloseConnection)
Do While drSQL.read = true
' Code Here
Loop
-
Feb 15th, 2004, 02:17 PM
#7
Thread Starter
Member
Ok... I shall try it and then i will get back..
thanks for now
/Tyson
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|