|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
vb.net I have the following values in a hold fiels
,c52c1619-6e33-4d49-8705-b05697be7da7,e97aa5e5-def8-44of-a0cf-c9e445ac54e8 thest are two guid's what I need to do is to remove the " , " and pass the information to a stored procedure. The following code removes the first " , " and gets the first guid value but skips the second guid value HELP PLEASE !! If AllClasses = True Then Dim Array() As String Array = (Split(HoldAllGuids, ",")) Dim I As Integer For I = 0 To UBound(Array) - 1 If Array(I) = "" Then 'REMOVES THE COMMA BETWEEN THE GUIDS Else cmd.Parameters("@Announcement_Job_Class_Guid").Value = Array(I) MsgBox(Array(I)).ToString() message box = (c52c1619-6e33-4d49-8705-b05697be7da7) Try cmd.ExecuteNonQuery() Catch er As Exception MsgBox(er.Message) End Try End If Next End If |
|
#2
|
||||
|
||||
|
Since the array will only be one dimension, you can make your FOR like this:
FOR EACH element IN ary sp_Foo element NEXT |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > Array |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|