Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Chi sā spiegarmi l'utilitā di esportare un dataset in byte ???

    Salve gente

    Stō implementanto una Stored Procedure di un metodo di un webservice creato
    da una societā esterna per una applicazione mobile . . .

    Il webservice č in 2.0 , ho visto che il metodo che si appoggia sulla stored che stō creando ,
    come output restituisce un array di byte , preso dal dataset in questo modo :

    codice:
                 cnn.Open();
                 byte[] b;
                 ....
                string query = "spGetUtenti";
    
                SqlCommand cmd = new SqlCommand(query, cnn);
    
                cmd.CommandType = CommandType.StoredProcedure;
    
                SqlParameter sqlPar = new SqlParameter("@utente", SqlDbType.VarChar);
                sqlPar.Value = utente;
                cmd.Parameters.Add(sqlPar);
    
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                da.Fill(ds);
    
                b = CustomSerializer.SerializeDataSet(ds);
    
                return b
    Io son nuovo in 2.0 , cmq a che mi serve restituire un dataset in Byte ???

    Che ci posso fare con questi byte dopo ???

    :master:

  2. #2
    Uau che domandona ... Beh diciamo che serializzando potresti esporre in un metodo il tuo DataSet oppure restituirlo tramite un WebServices oppure ancora leggerlo via Stream come se fosse perlappunto (??) un array di byte ...

    Vantaggi? Velocitā, dimensioni trasporto ...

  3. #3
    Infatti č un webservice per un applicazione mobile

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.