Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
PreparedStatement:-Execute - execute a prepared statement
Calling Sequence
preparedstat:-Execute( opts )
Parameters
preparedstat
-
PreparedStatement module
opts
anything; parameter to insert into the prepared statement
Description
Execute inserts its arguments into the prepared statement represented by preparedstat. The statement is then executed.
Execute accepts at most the number of arguments as parameters ("?") in the SQL string passed into CreatePreparedStatement. If less are given, then SQL NULL is used for the unspecified parameters.
Maple attempts to convert the Maple type passed into Execute to the correct SQL type. If the default Maple conversion is incorrect, you can specify the conversion using a type cast. For details, see Database/conversions.
Execute returns the return value of the first statement. The return values of subsequent statements are accessible via NextResult.
If a statement is an update, then the return value is an integer representing the update count. If a statement is a query, then the return value is a Result module representing the table of values.
Not all Java Database Connectivity [JDBC] Drivers can handle multiple SQL statements in a single string. In this case, the behavior of Execute with multiple statements is undefined.
If a large number of similar statements are to be executed (for example populating a table with INSERTs), using a PreparedStatement may be more efficient than Statement.
Examples
Execute some statements.
Check the value.
Get the next result.
Get the value.
Now the last result
See Also
Database, Database[Connection][ExecuteQuery], Database[Connection][ExecuteUpdate], Database[PreparedStatement], Database[PreparedStatement][NextResult], Database[Result], Database[Statement], Database[usage]
Download Help Document