Skip to content Skip to sidebar Skip to footer

Index Was Outside The Bounds Of The Array

I am getting this error: Index was outside the bounds of the array. Code: private void PopulateWallPosts(string userId) { using (OdbcConnection cn = new OdbcConne

Solution 1:

GetString(2) looks suspicious when you are only selecting 2 columns:

SELECT wp.WallPostings, p.PicturePathFROM ...

Since it is 0-based, that should probably be GetString(1)

Post a Comment for "Index Was Outside The Bounds Of The Array"