在ubuntu linux db2上的c中预编译嵌入式sql不起作用

问题描述 投票:0回答:1

我之前问过,但看起来不是我,而是系统。我的db2安装完成时出现了“小错误”,也许就是这样。我无法找出错误代码的说明。

文件夹的内容:

prog1.sqc sh.sh

我已将DBADM权限授予实例用户。它应该自行创建bnd文件,对吗?

这里是报告:

 $ db2 precompile prog1.sqc bindfile

 LINE    MESSAGES FOR prog1.sqc
 ------  --------------------------------------------------------------------
    SQL0060W  The "C" precompiler is in progress.
    SQL0031C  File "/home/nikica/UCENJE/precompile/prog1.bnd" 
              could not be opened.
    SQL0095N  No bind file was created because of previous 
              errors.
    SQL0091W  Precompilation or binding was ended with "2" 
              errors and "0" warnings.

IBM支持页面:

https://www.ibm.com/support/pages/running-db2look-db2-instance-user-fails-sql0031c-file-db2lkfunbnd-could-not-be-opened

编辑:我的sqc

  #include <stdio.h>
  #include <string.h>
  #include <sqlca.h>

   /* SQL includes */
   EXEC SQL INCLUDE SQLCA;

   EXEC SQL BEGIN DECLARE SECTION;


   EXEC SQL END DECLARE SECTION;

    int main()
    {
    // EXEC SQL CONNECT TO sample;

   return (0);
  }
c ubuntu db2 precompile embedded-sql
1个回答
0
投票

用]解决>

 Precompilation or binding was ended with "0" 
              errors and "0" warnings.

感谢毛

在开始前加上“ su-root”之前进行了100次类似的所有步骤

© www.soinside.com 2019 - 2024. All rights reserved.