Hi,
Is there any way to let NetTiers generate zerobased column enums? I use the column enum to retrieve data from dataset records, but there the column names are zero based.
For example, table Users:
UserId
UserName
UserPassword
Creates enum:
[EnumTextValue("UserId")]
[ColumnEnum("UserId", typeof(System.Int32), System.Data.DbType.Int32, true, true, false)]
UserId= 1,
[EnumTextValue("UserName")]
[ColumnEnum("UserName", typeof(System.Int32), System.Data.DbType.Int32, true, true, false)]
UserName=2,
[EnumTextValue("UserPassword")]
[ColumnEnum("UserPassword", typeof(System.Int32), System.Data.DbType.Int32, true, true, false)]
UserId= 3
Now, i have a custom stored procedure, _Users_GetByPassword. This SP can return a dataset. If i create a loop for each record within the resulting table and want to display the username, it could be something like this:
foreach(datarow r in GetByPassword('gjdfjsgjsdjg').Tables[0].Rows)
{
response.write(r[UsersColumn.UserName].ToString());
}
But UserColumn.Username will result into column 2. Because the columns within the row are zero based, this would return the user password instead. This would be solved if the generated enum could also be zero based... because i'm new at NetTiers it could well be that there is a way more easy sollution for this, offcourse i would be happy to hear from :-)
Thanks for any response!