28 lines
600 B
Matlab
Executable File
28 lines
600 B
Matlab
Executable File
function DB = database_definition(~,FileName)
|
|
|
|
%% DB ASE
|
|
|
|
fileID = fopen(FileName,'a');
|
|
fmt = '%s \r';
|
|
text = 'database_definition function started';
|
|
fprintf(fileID,fmt,text);
|
|
|
|
Dati = importdata('DB.txt');
|
|
dbname = Dati{1,1};
|
|
username = Dati{2,1};
|
|
password = Dati{3,1};
|
|
driver = Dati{4,1};
|
|
dburl = Dati{5,1};
|
|
|
|
DB{1,1} = cellstr(dbname);
|
|
DB{2,1} = cellstr(username);
|
|
DB{3,1} = cellstr(password);
|
|
DB{4,1} = cellstr(driver);
|
|
DB{5,1} = cellstr(dburl);
|
|
|
|
text = 'Database defined correctly and database_definition function closed';
|
|
fprintf(fileID,fmt,text);
|
|
fclose(fileID);
|
|
|
|
end
|