Posts by Marco Souza • 12,304 points
506 posts
-
0
votes3
answers2086
viewsA: Return an sql command in a Function
You can create a procedure return a table, call the procedure make a insert in a temporary table and then use this table in queries. From what I saw you want to put the result of a select in a…
-
1
votes2
answers1244
viewsA: How to loop with while using array
In query sql you can pass the array ... query("SELECT * FROM medias WHERE id in( "+ $mediaID +"); , It’s only a foreach
-
5
votes4
answers34297
viewsA: Take the highest value per category by also loading the ID
Hello, See an example below.. declare @tabela table ( ID int, Categora char(1), quantidade int ) insert into @tabela values (1 , 'A' , 23), (2 , 'A ' , 12), (3 , 'A' , 11), (1 , 'B' , 15 ), (2 , 'B'…
-
1
votes2
answers581
viewsA: Get the ID of a line from a Gridview query
See an example below. protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Detalhar") { chamadosEntities carga1 = new chamadosEntities();…
-
4
votes3
answers10606
viewsA: Convert object to String?
Hello, you can make a casting passing to the expected type, but it is good to make sure that the object is of the correct type. int i = (Integer) object; Font: stackoverflow…
-
2
votes3
answers3217
viewsA: How to read an excel file in c# and save the data in strings?
I use Gembox.Spreadsheet 3.7 for . NET 3.0 - 4.5 to import from Excel protected void lnkValidar_Click(object sender, EventArgs e) { if (FileUpload.HasFile) { FileInfo finfo = new…