??? No constructor 'com.mathworks.toolbox.database.sqlExec' with matching signature found. I am not able to resolve this problem
3 views (last 30 days)
Show older comments
I am getting following error, can you please tell me what will be possible root causes?????
??? No constructor 'com.mathworks.toolbox.database.sqlExec' with matching signature found.
Error in ==> cursor.cursor at 60 curs.Cursor = com.mathworks.toolbox.database.sqlExec(curs.SQLQuery ,connect.Handle);
Error in ==> database.exec at 34 curs=cursor(connect,sqlQuery);
Error in ==> database.insert at 168 cursTemp=exec(connect,writeString);
Error in ==> Load_FRB at 94 insert(conn,'fuzzy_rb',{'Rule_ID','Attribute_ID','Premise_Variable','Dom_Value','Conclusion_Variable','Con_Value'},B1); =================================================================================================
The program is as follows
function [ output_args ] = Load_FRB() %This function generates the dataset of 'nq' question level marks of 'nt' number %of teachers for each 'ns' student. t=0; t=round(xlsread('FRB.xlsx', 'info','C2:C3'))% Read ns, nq, nt from excel file
%na- number of attributes %nv- number of linguistic variabls
na=t(1); nv=t(2);
% Number of records in FRBS
nr_FRBS= power(nv,na); counter_attributes = ones(1,na);
% Set preferences with setdbprefs. s.DataReturnFormat = 'cellarray'; s.ErrorHandling = 'store'; s.NullNumberRead = 'NaN'; s.NullNumberWrite = 'NaN'; s.NullStringRead = 'null'; s.NullStringWrite = 'null'; s.JDBCDataSourceFile = ''; s.UseRegistryForSources = 'yes'; s.TempDirForRegistryOutput = 'C:\Users\SATSOF~1\AppData\Local\Temp'; setdbprefs(s)
% Make connection to database. Note that the password has been omitted. % Using ODBC driver. conn = database('module2','','password');
% Read data from database. If existing data present then it is deleted from % database table marks by followiing commands e1 = exec(conn,'DELETE * FROM fuzzy_rb');
e= fetch(e1);
close(e);
% Identifying how many grade types % Read data from database. e1 = exec(conn,'SELECT DISTINCT type, type_value FROM fuzzyset ORDER by type_value'); c1 = fetch(e1); Grade=c1.data(:,1); close(e1);
% Grade=xlsread('FRB.xlsx', 'grade',range)% Read marks of student(str) of nt teachers from excel file
[nr_grade nc_grade] = size(Grade);
% Load the marks of question 1 to nq from the excel file
h = waitbar(0,'Loading of Fuzzy Rulebase is in progress. Please wait...');
for i=1:nr_FRBS fprintf('\n ================================================================\n') fprintf('\n Writing Data for Rule Number %d in Fuzzy Rule Base= ',i) fprintf('\n ================================================================\n')
dom_val = 0.6; % By default value of degree of match is 0.0
con_val = 0.6; % By default value of confidence of expert is 0.0
count_total= sum(counter_attributes);
grade_type_value = count_total/na;
for y=1:nv
temp = abs(grade_type_value - y);
if(y==1)
distance = temp;
Conclusion_Variable = Grade(y);
continue;
end
if(temp < distance)
distance = temp;
Conclusion_Variable = Grade(y);
end
end
for j=1:na
Premise=Grade(counter_attributes(j));
B1={i,j,Premise,dom_val,Conclusion_Variable,con_val};
% Write data to database.
insert(conn,'fuzzy_rb',{'Rule_ID','Attribute_ID','Premise_Variable','Dom_Value','Conclusion_Variable','Con_Value'},B1);
end
k=1;
count_attributes(k)=count_attributes(k)+1;
Flag = 1;
while((k<=na)&& (Flag ==1))
if(count_attributes(k)<=nv)
Flag=0;
end
if(count_attributes(k)>nv)
Flag=1;
count_attributes(k)=1;
count_attributes(k+1)=count_attributes(k+1)+1;
end
k=k+1;
end
waitbar(i/ns)
%
end
close(h) ;
% Close database connection.
close(conn)
msgbox('Dataset is loaded successfully!!!','Success');
uiwait();
module2_main;
fprintf('\n The Data Set is Generated Successfullly!!!!\n')
end
0 Comments
Answers (0)
See Also
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!