IT咨询服务error数据库

esql连接数据库失败

dbaccess能够连到数据库
但是在esql中连接数据库失败
比如 下面这小段esql程序编译后运行会出现错误
程序:
#include
main(){
$WHENEVER ERROR STOP;
$database testdb;
$insert into t values(1,"aaa");
$close  testdb;
}

错误如下:
Program stopped by WHENEVER STOP
sqlca:
sqlcode:-930
sqlerrm: 'linux40'
sqlerrp: ''
sqlerrd:
sqlerrd(1)=0
        (2)=0
        (3)=0
        (4)=0
        (5)=0
        (6)=0
sqlwarn.sqlwarn0:
        .sqlwarn1:
        .sqlwarn2:
        .sqlwarn3:
        .sqlwarn4:
        .sqlwarn5:
        .sqlwarn6:
        .sqlwarn7:
参与12

12同行回答

yhl71yhl71数据库架构师某公司
看看INFORMIXSERVER环境变量和informix用户下的INFORMIXSERVER环境变量是否一致。显示全部
看看INFORMIXSERVER环境变量和informix用户下的INFORMIXSERVER环境变量是否一致。收起
IT咨询服务 · 2011-03-02
浏览1372
爱上毛毛虫爱上毛毛虫产品经理huatech
#includemain(){EXEC SQL WHENEVER ERROR STOP;EXEC SQL connect to "testdb";EXEC SQL insert into t values(1,"aaa");EXEC SQL disconnect current;}试试这样可以么显示全部
#include
main(){
EXEC SQL WHENEVER ERROR STOP;
EXEC SQL connect to "testdb";
EXEC SQL insert into t values(1,"aaa");
EXEC SQL disconnect current;
}

试试这样可以么收起
互联网服务 · 2011-02-28
浏览1368
jillmejillme课题专家组CIO某大型银行
$database testdb;是应该 $database "testdb"这样用法吧;显示全部
$database testdb;

是应该 $database "testdb"这样用法吧;收起
互联网服务 · 2011-02-20
浏览1558
xteitxuxteitxu系统工程师北京荣新
高深噢。学习一下了显示全部
高深噢。学习一下了收起
政府机关 · 2011-02-19
浏览1509
gllysltjgllysltj数据库架构师烽火通信
testdb是数据库的名字,还是一个变量里面存的数据库名。我做了实验,用的变量是没有问题的,实在不行用connect命令吧。显示全部
testdb是数据库的名字,还是一个变量里面存的数据库名。我做了实验,用的变量是没有问题的,实在不行用connect命令吧。收起
电信设备制造商 · 2011-02-18
浏览1531
feipigfeipig软件架构设计师HCXT
回复 5# hugolin     esql中连接数据库就是connect to dbname..显示全部
回复 5# hugolin


    esql中连接数据库就是connect to dbname..收起
系统集成 · 2011-02-18
浏览1543
afliaoafliao数据库管理员南大通用
是在本机上操作的么?看错误代码好象不是,那需要使用 testdb@your_server_name,来连接-930------------ ...gllysltj 发表于 2011-2-18 15:42     是本机  不是远程实例显示全部
是在本机上操作的么?看错误代码好象不是,那需要使用 testdb@your_server_name,来连接
-930
------------ ...
gllysltj 发表于 2011-2-18 15:42



    是本机  不是远程实例收起
IT咨询服务 · 2011-02-18
浏览1529
afliaoafliao数据库管理员南大通用
回复 3# 阳绿玻璃     $database testdb;就是连接数据库显示全部
回复 3# 阳绿玻璃


    $database testdb;
就是连接数据库收起
IT咨询服务 · 2011-02-18
浏览1490
hugolinhugolin数据库管理员gbase
晕,你不连数据库怎么可能INSERT呢?$connect to BName  user :UserName using wd;阳绿玻璃 发表于 2011-2-18 15:56    你那是db2的连接吧显示全部
晕,你不连数据库怎么可能INSERT呢?
$connect to BName  user :UserName using wd;
阳绿玻璃 发表于 2011-2-18 15:56



   你那是db2的连接吧收起
互联网服务 · 2011-02-18
浏览1512
忧愁绽放忧愁绽放系统工程师zznode
bash-3.00$  finderr 930-930    Cannot connect to database server servername.The application is trying to access another computer system but failed.Note the server name in the current statement. Ask your networkadministrator and DB...显示全部
bash-3.00$  finderr 930
-930    Cannot connect to database server servername.

The application is trying to access another computer system but failed.
Note the server name in the current statement. Ask your network
administrator and DBA to check that the network is operational and that
the particular database server is active. This message appears with
Version 6.0 and later.


-930    Cannot connect to remote host sitename.

IBM Informix STAR or IBM Informix NET is trying to access another computer
system but has failed. Note the site name in the current statement.
Contact your network administrator, and ask for a check that the
network is operational and that the particular site is active. This
message appears in database servers prior to Version 6.0.收起
电信设备制造商 · 2011-02-18
浏览1558

提问者

afliao
数据库管理员南大通用

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2011-02-18
  • 关注会员:0 人
  • 问题浏览:8523
  • 最近回答:2011-03-02
  • X社区推广