adoÁ¬½ÓoracleµÄ¹ÖÎÊÌâ
ÒÔÇ°³ÌÐòºÃºÃµÄ,ÄܽøÐÐÈκβÙ×÷
µ«´Ó×òÌ쿪ʼͻȻÁ¬½ÓÊý¾Ý¿âʧ°Ü,´úÂëÈçÏÂ:
try
{
::CoInitialize(NULL);
hr=m_pConnection.CreateInstance(__uuidof(Connection));
if (SUCCEEDED(hr))
MessageBox( "ok ");
else
MessageBox( "bad ");
m_pConnection-> Open( "Provider=MSDAORA.1;Data Source=abc; ", "eval ", "eval123 ",adModeUnknown);
}
catch (_com_error e)
{
AfxMessageBox(e.ErrorMessage());
AfxMessageBox( "Êý¾Ý¿âÁ¬½Ó²»³É¹¦! ");
}
½á¹ûÏÈÏÔʾok,È»ºó¾ÍÊÇ "δָ¶¨µÄ´íÎó "ºÍ "Êý¾Ý¿âÁ¬½Ó²»³É¹¦! "
Ö÷Òª»³ÒÉm_pConnection-> Open( "Provider=MSDAORA.1;Data Source=abc; ", "eval ", "eval123 ",adModeUnknown);
µ«ÒÔÇ°¶¼ÊǺúõİ¡,Ææ¹ÖÁË,Íû°ïæ½â¾ö,ÏÈлÁË
²éÒ»ÏÂÊý¾ÝÔ´¡£³ÌÐò±¾Éíû´í
Ê×ÏÈÄãÓÐûÓн¨Á¢abcÊý¾ÝÔ´°¡,
ÏÈͨ¹ýODBC²âÊÔÒ»ÏÂÄãµÄÊý¾ÝÔ´Á¬½ÓÊÇ·ñÕý³£
ÊDz»ÊÇÄã˵µÄÄǾ仰¸ñʽÓÐÎó£¬ÊDz»ÊǶàÁË¿Õ¸ñʲôµÄ
ÀÏ´ó,Äã½²µÄ½¨Á¢abcÊý¾ÝÔ´ÊÇʲôÒâ˼°¡
ÓÃadoÁ¬½Ó²»ÒªÔÚodbcÀïÃæÉèÖõİ¡
ÍûÖ¸½Ì
Ïà¹ØÎÊ´ð£º
»·¾³£º1.win2003server+oracle9i
2.oracle9i×Ö·û¼¯ÎªAMERICAN_AMERICA.WE8ISO8859P1
3.oracle sql developer°æ±¾ 1.5.5
ÏÖÏóÃèÊö: 1.ÔÚsql developer ÖвéѯoracleÖеÄij¸ö±í£¬ÖÐÎÄÈ«²¿ÏÔʾΪÂÒÂë¡£
......
ÎÒ¶ÔSQL SERVERºÍACCESS±È½ÏÊ죬ËùÒÔÊý¾Ý¿âµÄͨÓûù´¡¶«Î÷¿ÉÒÔ˵¶¼ÕÆÎյIJ¶àÁË£¬ÎÒÏÖÔÚÏëÒªµÄ¾ÍÊÇÒÔÉÏÁ½Êý¾Ý¿âµÄ¶ÀÌØÖ®´¦µÄ½éÉܺÍÓ¦ÓýéÉÜ¡£
ÁíÍâÊé×îºÃ¶ÔÓ¦×îа汾 oracleÊÇ11g°É 10µÄÒ²ÐУ»mysqlÊÇ5.1°É
л ......
±ÈÈçÎÒÓÐtestA¡¢testB¡¢testCÈý¸ö±í
ÎÒÏÖÔÚÐèҪдһ¸öÅú´¦Àí»òÕ߽ű¾¸ø±ðÈË ×÷ÓþÍÊÇÖ´ÐÐÕâ¶ÎÓï¾ä¿ÉÒÔÇå³ýÕâÈý¸ö±íÀïÃæµÄÊý¾Ý ¾ÍÊÇÒ»¸ö³õʼ»¯µÄÒâ˼
ÄÄλ¸ßÈË°ïÖúÏ°¡ Ò»¸öÊý¾Ý¿âС°×ÔÚ´ËÇó¾ÈÀ²
SQL code:
......
ÎÒдµÄÒ»¸öJob
declare
job1 integer;
begin
dbms_job.submit(job1,
'Sale_FinanceUseFee(4,null,null,null);',
TRUNC(SYSDATE)+1.103, ......
Óиö´æ´¢¹ý³ÌÓÐÈý¸öInt²ÎÊýºÍÒ»¸öOut²ÎÊý.
Ö´ÐÐʱÏȽ«Ò»Ð©Êý¾Ý²åÈëµ½Ò»¸ö±íÖÐ.È»ºóÔÙ´Ó±íÖÐÈ¡³öÊý¾Ý½øÐÐÐÐתÁÐ,ºÏ¼ÆµÈÂß¼.½«´¦Àí½á¹û·Åµ½Ò»¸ö±íÖÐ.²¢½«Idͨ¹ýOut²ÎÊý·µ»Ø.
µ«ÔÚÖ´ÐÐʱ¿ÉÒÔ»ñÈ¡µ½OutÖµ,µ«¾ÍÊÇà ......