¹ØÓÚLINUXϱàÒëOTL³öÏÖµÄOCI.HÕÒ²»µ½µÄÎÊÌâ
³ÌÐòºÜ¼òµ¥¾ÍÊÇÒ»¸öÁ¬½Ó¿âµÄС³ÌÐò£¬±àÒëµÄʱºòÕÒ²»µ½OCI.H£¬Çó´óϺÃÇ¿´¿´
³ÌÐò
#include <iostream>
#include <stdio.h>
using namespace std;
#define OTL_ORA9I // Compile OTL 4.0/OCI9i
#include "otlv4.h" // include the OTL 4.0 header file
otl_connect db; // connect object
int main()
{
otl_connect::otl_initialize(); // initialize OCI environment
try
{
cout < <"Connect to database..." < <endl;
db.rlogon("asion/asion@cost219"); // connect to Oracle
cout < <"Á¬½Ó³É¹¦" < <endl;
}
catch(otl_exception& p)
{
// intercept OTL exceptions
cerr < <p.msg < <endl; // print out error message
cerr < <p.stm_text < <endl; // print out SQL
Ïà¹ØÎÊ´ð£º
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
ʹÓÃStruts2ÉÏ´«Îļþ£¬ÔÚlinuxϱ¨´í
2009-09-29 14:56:20,801 [org.apache.struts2.interceptor.FileUploadInterceptor]-[ERROR] Processing of multipart/form-data request failed. c:/temp/upload__1dcd07ee_12 ......
ÎÊÌâÊÇÕâÑùµÄ£¬±ÈÈçÎÒÏÖÔÚÔÚ/usrÏÂÓиöĿ¼softÐèÒªÈÃËüÿÌì×Ô¶¯Ñ¹Ëõ´ò°üµ½/opt/ftpµÄĿ¼Ï£¬Ó¦¸ÃÔõÑùŪ£¬ÓÐûÓа취¸úÔÚwindowsϵͳµÄÄǸöwinrarÒ»ÑùµÄʵÏÖ£¬Ã¿Ìì×Ô¶¯´ò°üѹËõ£¬È»ºóÒÔÎļþÃû¼Óµ±Ç°µÄʱ¼äÀ´ÃüÃûÕ⸠......
#include "stdlib.h"
#include "stdio.h"
#include "errno.h"
#include "string.h"
#include "netdb.h"
#include "sys/types.h"
#i ......
ÎÒÓÃkdevelopн¨ÁËÒ»¸ö»ùÓÚ¼òµ¥µÄhelloworldµÄ¹¤³Ì£¬ÆäʵÎÒÊÇÏë¸úVCÄÇÑù´´½¨Ò»¸öDLLµÄ¹¤³Ì£¨Ï൱LINUXϵÄSO£©£¬²»¹ýÕâIDEºÃÏñûÓУ¬ÎÒÔÚÕâÀïÃæÓÐ10¸öÀ´À࣬ÕâЩÀàÖ®¼ä¿ÉÄÜ´æÔÚ½»²æÒýÓõĹØϵ£¬±¾ÉíÓÖÒýÓÃÁËÍⲿµÄÁ ......