Hi all,
I am having a problem with executeStoredProcedure on a MySQL database that I am having a tough time figuring out. I am trying to run a function that I created in MySQL 5.0.18 that is working in Query Browser but not in Servoy. Whenever I try to run it, the dataset returned has an error: “Unable to retrieve metadata for procedure. Unable to retrieve metadata for procedure.” Yes it lists it twice.
I am not sure what is going on, but I have supplied my code below. The function takes 8 parameters, so it is a bit lengthy.
Does anyone have an idea?
Thanks,
Jason
var locus = plugins.dialogs.showInputDialog( 'Locus', 'Locus');
var race = plugins.dialogs.showInputDialog( 'race', 'race');
var m1 = plugins.dialogs.showInputDialog( 'm1', 'm1');
var m2 = plugins.dialogs.showInputDialog( 'm2', 'm2');
var c1 = plugins.dialogs.showInputDialog( 'c1', 'c1');
var c2 = plugins.dialogs.showInputDialog( 'c2', 'c2');
var af1 = plugins.dialogs.showInputDialog( 'af1', 'af1');
var af2 = plugins.dialogs.showInputDialog( 'af2', 'af2');
//Execute a stored procedure
var maxReturnedRows = 10;
var procedure_declaration = '{?=PICALCTRIO(?,?,?,?,?,?,?,?)}';
var args = new Array();
args[0] = java.sql.Types.NUMERIC;
args[1] = locus;
args[2] = race;
args[3] = m1;
args[4] = m2;
args[5] = c1;
args[6] = c2;
args[7] = af1;
args[8] = af2;
var typesArray = new Array();
typesArray[0]=1;
typesArray[1]=0;
typesArray[2]=0;
typesArray[3]=0;
typesArray[4]=0;
typesArray[5]=0;
typesArray[6]=0;
typesArray[7]=0;
typesArray[8]=0;
var dataset = databaseManager.executeStoredProcedure(forms.allelefrequency.controller.getServerName(),
procedure_declaration, args, typesArray,maxReturnedRows);
plugins.dialogs.showInfoDialog( null , args[0], 'OK');