Compiled application - PostreSQL connection with JDBC driver

1 次查看(过去 30 天)
Hello!
I have created a script which creates a jdbc connection to a Postgresql database. In the editor the script runs fine, but when I compile the script it doesn't. I have included the driver into the required files and also the driver full path to static path of javaclasspath. Please help.I am using Matlab 2016b.
You may find below the code:
conn= database('db,'usern','pwd');
scriptfile= ['select "GPS_LON","GPS_LAT","SPEED_LOG_SPEED",'...
'"SHAFT_HORSE_POWER","ME_SHAFT_REVOLUTION",'...
'"ME_FUEL_PUMP_MARK","ME_SCAV_AIR_PRESS","ME_FO_FLOW","ME_FO_IN_TEMP",'...
'"ME_EXH_GAS_MEAN_TEMP","GE_FO_FLOW",'...
'"NO_1_DG_ELECTRIC_LOAD","NO_2_DG_ELECTRIC_LOAD","NO_3_DG_ELECTRIC_LOAD",'...
'"ENGINE_RM_TEMP","ME_TC_REVOLUTION",'...
'"NO_1_DG_EXH_G_TC_1_TO_3_TEMP",'...
'"NO_1_DG_EXH_G_TC_4_TO_6_TEMP",'...
'"NO_2_DG_EXH_G_TC_1_TO_3_TEMP",'...
'"NO_2_DG_EXH_G_TC_4_TO_6_TEMP",'...
'"NO_3_DG_EXH_G_TC_1_TO_3_TEMP",'...
'"NO_3_DG_EXH_G_TC_4_TO_6_TEMP",'...
'"TIMESTAMP_UTC",'...
'"VESSEL_UNIQUEID" from "Aframax_Data" where "TIMESTAMP_UTC">=current_date-2 and "VESSEL_UNIQUEID"=''1625'''];
results = fetch(conn,scriptfile);

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Database Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by