?? proccallprocedureonlinux.txt
字號:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sqlca.h>
void deleteEMP();
void sql_error();
int main(void)
{
EXEC SQL BEGIN DECLARE SECTION;
char username[10],password[10],sername[10],dblink[10];
EXEC SQL END DECLARE SECTION;
strcpy(username,"scott");
strcpy(password,"scott");
strcpy(sername,"orcl");
strcpy(dblink,"to_linux");
EXEC SQL CONNECT :username IDENTIFIED BY :password USING :sername;
if (sqlca.sqlcode==0)
{
printf("connect OK\n");
EXEC SQL EXECUTE
begin
bind_value_test;
end;
END-EXEC;
printf("end execute pl-sql");
EXEC SQL COMMIT RELEASE;
/* sleep(100);*/
}
else
sql_error();
}
void sql_error()
{
printf("%.*s\n",sqlca.sqlerrm.sqlerrml,sqlca.sqlerrm.sqlerrmc);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -