Prev: connect bindingSource to text object.
Next: bindingSource.Position = ... doesn't change the current property.
From: Keith G Hicks on 29 May 2010 12:17 I'm passing a string of county names from a SQL procedure to my vb.net code. I can set the string in whatever way needed but right now I passing it like this: "oakland","wayne","saginaw","houghton" Each county has " around it and they are separated by a comma. The vb.net variable for the string of counties is autoRunCounties I need to sequence through the string on the vb.net end. I tried this but it doesn't work I think because vb.net puts extra double quotes around the value in the variable but that migh tjust be for the sake of the *watch* value shown to show that it's a string: Dim autoRunCountiesArray() = {autoRunCounties} For Each oneCounty As String In autoRunCountiesArray ... do stuff Next oneCounty oneCounty ends up lookign like this ""oakland","wayne","saginaw","houghton""
From: Keith G Hicks on 29 May 2010 12:35
Never mind. I found a solution here: http://articles.techrepublic.com.com/5100-10878_11-6030362.html "Keith G Hicks" <krh(a)comcast.net> wrote in message news:uo$3xp0$KHA.3176(a)TK2MSFTNGP05.phx.gbl... > I'm passing a string of county names from a SQL procedure to my vb.net > code. > I can set the string in whatever way needed but right now I passing it > like this: > > "oakland","wayne","saginaw","houghton" > > Each county has " around it and they are separated by a comma. The vb.net > variable for the string of counties is autoRunCounties > > I need to sequence through the string on the vb.net end. I tried this but > it > doesn't work I think because vb.net puts extra double quotes around the > value in the variable but that migh tjust be for the sake of the *watch* > value shown to show that it's a string: > > Dim autoRunCountiesArray() = {autoRunCounties} > > For Each oneCounty As String In autoRunCountiesArray > ... do stuff > Next oneCounty > > oneCounty ends up lookign like this > ""oakland","wayne","saginaw","houghton"" > > > > |