MATLAB DATABASE TOOLBOX RELEASE NOTES Guide de l'utilisateur Page 644

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 684
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 643
7 Functions — Alphabetical List
7-214
GO
Create a Microsoft SQL Server database connection conn using the JDBC driver. For
details, see “Connecting to a Database”. Then, call the stored procedure using:
Database connection conn
Stored procedure productsWithinUnitCost
Input arguments inputargs to specify a unit cost between 19 and 21
Output Java data types outputtypes to specify numeric and string data types for
product number and description
inputargs = {19,21};
outputtypes = {java.sql.Types.NUMERIC,java.sql.Types.VARCHAR};
results = runstoredprocedure(conn,'productsWithinUnitCost',...
inputargs,outputtypes)
results =
[1x1 java.math.BigDecimal]
'Snacks'
results returns a cell array that contains the product number as a Java decimal data
type and the product description as a string.
Display the product number in results.
results{1}
ans =
15
The product with product number 15 has a unit cost between 19 and 21.
Display the product description in results.
results{2}
ans =
Snacks
The product with product number 15 has the product description Snacks.
Vue de la page 643
1 2 ... 639 640 641 642 643 644 645 646 647 648 649 ... 683 684

Commentaires sur ces manuels

Pas de commentaire