Albert Kallal Active Member Licensed User Jan 18, 2020 #1 I have this wee bit of code: B4X: Copy Dim f As String = "City,FirstName,LastName" ' field list Dim v As List ' field values v.Initialize2(Array As Object("Jasper","Albert","Kallal")) Gbl.SQLUpdate(Main.mysql,"tblHotels",f,v,Main.gID) Now I not going to call mom, but is this the same, and ok? B4X: Copy Dim f As String = "City,FirstName,LastName" ' field list Dim v As List = Array As Object("Jasper","Albert","Kallal") ' field values Gbl.SQLUpdate(Main.mysql,"tblHotels",f,v,Main.gID) Now, one extra line of code not going to hurt me, but are the above 2 ok? Or to be safe, should one stick to using Initialize2? They both work fine - and they are both of course resulting in a fixed list size - and that's just fine. Regards, Albert D. Kallal Edmonton, Alberta, Canada
I have this wee bit of code: B4X: Copy Dim f As String = "City,FirstName,LastName" ' field list Dim v As List ' field values v.Initialize2(Array As Object("Jasper","Albert","Kallal")) Gbl.SQLUpdate(Main.mysql,"tblHotels",f,v,Main.gID) Now I not going to call mom, but is this the same, and ok? B4X: Copy Dim f As String = "City,FirstName,LastName" ' field list Dim v As List = Array As Object("Jasper","Albert","Kallal") ' field values Gbl.SQLUpdate(Main.mysql,"tblHotels",f,v,Main.gID) Now, one extra line of code not going to hurt me, but are the above 2 ok? Or to be safe, should one stick to using Initialize2? They both work fine - and they are both of course resulting in a fixed list size - and that's just fine. Regards, Albert D. Kallal Edmonton, Alberta, Canada
Peter Simpson Expert Licensed User Longtime User Jan 18, 2020 #2 In one wee word @Albert Kallal , yes... Upvote 0
Albert Kallal Active Member Licensed User Jan 18, 2020 #3 Thank you for that wee bit of advice! I just did not want to start out writing too much code down a bad garden path. A simple question, but I do feel better now Thank you. Regards, Albert D. Kallal Edmonton, Alberta, Canada Upvote 0
Thank you for that wee bit of advice! I just did not want to start out writing too much code down a bad garden path. A simple question, but I do feel better now Thank you. Regards, Albert D. Kallal Edmonton, Alberta, Canada