Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Executing a mysql stored procedure
Message
 
 
À
27/12/2005 08:25:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
MySQL
Divers
Thread ID:
01080936
Message ID:
01080941
Vues:
21
What version of ODBC driver are you using? Does it support SPs?

>From what I can tell aerror() returns error 1229, too few arguments. Must be missing something here... it's like it doesn't understand the brackets or something.
>
>
>Don
>
>
>
>>What ODBC error do you get (AERROR()) ?
>>
>>
>>>MySQL 5 has triggers and stored procedures and I've been fighting trying to execute a simple MySQL stored procedure from within Visual Foxpro but it keeps failing.
>>>
>>>
>>>MySQL 5 side:
>>>
>>>
>>>delimiter $$
>>>
>>>drop function if exists 'somedatabase'.'add'$$
>>>create function 'add'(iParm1 INT, iParm2 INT)returns int(11)
>>>begin
>>> return iParm1+iParm2;
>>>end$$
>>>
>>>delimiter;
>>>
>>>
>>>The above executes fine manually from withing the query browser ( ex. select somedatabase.add(1,1) ) but fails when I attempt to run it from within Foxpro. My connection is good and read and writes work just fine.
>>>
>>>
>>>Foxpro side:
>>>
>>>
>>>MySQLcon = sqlconnect("someDSN","userid","userpwd")
>>>
>>>MySQL_Result = sqlexec(","select somedatabase.add(1,1)")
>>>
>>>
>>>I've also tried "somedatabase.add(1,1)" and "add(1,1)" in place of the above select statement but it fails returning a -1.
>>>
>>>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform