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);
댓글 수: 1
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!