ADO+ORACLE´óÏÀÇë½ø
ÎÒÏÖÔÚÏëʵÏÖÒ»¸öÅжÏORACLEÖÐÒ»¸öÊÓͼÊÇ·ñ´æÔÚ£¬Èç¹û´æÔÚ¾Íɾ³ý¡£
ÔÚ³ÌÐòÖÐÎÒÕâÑùдµÄ:
try
{
#pragma region [ɾµôÀϵÄÊÓͼ]
csSqlText.Format("SELECT COUNT(*) AS ÊÓͼ¼ÆÊý from SYS.ALL_VIEWS WHERE VIEW_NAME='%s';",csViewName);
if (!dbcontroler.Connect_to((_bstr_t)m_csOracleConnectionText)) return;
if (!dbcontroler.OpenRecordSet(csSqlText)) return;
if ( dbcontroler.p_RecordSet->ADOEOF) return;
dbcontroler.p_RecordSet->MoveFirst();
iViewCounter = dbcontroler.p_RecordSet->GetCollect("ÊÓͼ¼ÆÊý");
if (iViewCounter > 0)
{
csSqlText.Format("DROP VIEW %s",csViewName);
dbcontroler.UpDataDB(csSqlText);
}
dbcontroler.p_RecordSet->Close();
dbcontroler.p_Connection->Close();
}
catch(_com_error e)
{
CString errorString;
errorString.Format(_T("´ò¿ªÊý¾Ý¿â±í·¢ÉùÒì³£ £¬´íÎóÐÅÏ¢£º%s"),e.ErrorMessage());
AfxMessageBox(errorString);
return ;
}
×ÜÊÇÌáʾÊÓͼ²»´æÔÚ¡£
µ«ÊÇ£¬ÎÒÖ±½ÓÔÚoracleÖÐÖ´ÐÐSELECT COUNT(*) AS ÊÓͼ¼ÆÊý from SYS.ALL_VIEWS WHERE VIEW_NAME='È¥Äê²úÁ¿';ÊÇ¿ÉÒԵġ£
ÕâʱΪʲô£¿ÈçºÎ²ÅÄÜÔÚ³ÌÐòÀïÃæʵÏÖÊÓͼµÄɾ³ýÄØ£¿
Ïà¹ØÎĵµ£º
2008Äê06ÔÂ01ÈÕ ÐÇÆÚÈÕ 14:52
OracleµÄÊý¾Ý¿â¶ÔÏó·ÖΪÎåÖÖ£º±í£¬ÊÓͼ£¬ÐòÁУ¬Ë÷ÒýºÍͬÒå´Ê¡£
ÊÓͼÊÇ»ùÓÚÒ»¸ö±í»ò¶à¸ö±í»òÊÓͼµÄÂß¼±í£¬±¾Éí²»°üº¬Êý¾Ý£¬Í¨¹ýËü¿ÉÒÔ¶Ô±íÀïÃæµÄÊý¾Ý½øÐвéѯºÍÐ޸ġ£ÊÓͼ»ùÓڵıí³ÆΪ»ù±í¡£
ÊÓͼÊÇ´æ´¢ÔÚÊý¾Ý×ÖµäÀïµÄÒ»ÌõselectÓï¾ä¡£ ͨ¹ý´´½¨ÊÓͼ¿ÉÒÔÌáÈ¡Êý¾ÝµÄÂß¼Éϵļ¯ ......
ÔÎĵØÖ·£ºhttp://blog.csdn.net/cnham/archive/2009/08/30/4500928.aspx
oracleµÄ·ÖÎöº¯Êýover ¼°¿ª´°º¯Êý
Ò»£º·ÖÎöº¯Êýover
Oracle´Ó8.1.6¿ªÊ¼Ìṩ·ÖÎöº¯Êý£¬·ÖÎöº¯ÊýÓÃÓÚ¼ÆËã»ùÓÚ×éµÄijÖÖ¾ÛºÏÖµ£¬ËüºÍ¾ÛºÏº¯ÊýµÄ²»Í¬Ö®´¦ÊÇ
¶ÔÓÚÿ¸ö×é·µ»Ø¶àÐУ¬¶ø¾ÛºÏº¯Êý¶ÔÓÚÿ¸ö×éÖ»·µ»ØÒ»ÐС£
ÏÂÃæͨ¹ý¼¸¸öÀý×ÓÀ´ËµÃ÷ÆäÓ ......
ÏÖÏó£º
oracleÆô¶¯¼àÌý£¬±¨¸æÈçÏ´íÎó£º
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
ÔÒò£º
lisenter.log ÎļþÌ«´óÁË,OracleÎÞ·¨¶ÔËü½øÐвÙ×÷ÁË£¬µ¼ÖÂlistenerÎÞ·¨Õý³£Æô¶¯¡£
listener.log ³¬¹ý2G¾Í»á³öÎÊÌâ
·½·¨£º
·¨1. ÒƳýÔ$ ......
oracle µÄÔ¼ÊøÖ÷ÒªÊÇÔÚÒµÎñÂß¼²ãÃæά»¤Êý¾ÝµÄÍêÕûÐÔ¡£Ö÷Ҫͨ¹ý³ÌÐòÔ±ÔÚÓ¦ÓóÌÐòÖй涨ԼÊø»òÕßͨ¹ý¶¨Òå´¥·¢Æ÷À´Î¬»¤Êý¾ÝÍêÕûÐÔ£¬×îºóÊÇͨ¹ýʹÓÃoracle×Ô´øµÄÔ¼ÊøÀ´Î¬»¤Êý¾ÝÍêÕûÐÔ¡£ÄÜʹÓÃoracle×Ô´øµÄÔ¼Êø´ïµ½ÒªÇó¾Í¾¡Á¿Ê¹ÓÃoracle×Ô´øµÄÔ¼Êø£¬ÒòΪʹÓô¥·¢Æ÷µÈÓû§×Ô¶¨ÒåÔ¼Êø¶¼»áÓ°ÏìÊý¾Ý¿âµÄÐÔÄÜ¡£ÀýÈ磺ʹÓô¥·¢ ......
sqlÓï¾ä£º
select bid from t_branch c start with c.upbid ='11000000' connect by prior c.bid=c.upbid
˵Ã÷£º
1¡¢Í³¼Æij¸ö»ú¹¹ÏÂËùÓеÄ×ÓËï»ú¹¹¡£Èçͳ¼Æ±±¾©»ú¹¹ÏµÄ×ÓËï»ú¹¹£¬°üÀ¨£º³¯ÑôÇø»ú¹¹¡¢º£µíÓªÏú»ú¹¹¡¢¡¢¡¢ÇàÁúÇÅÏç»ú¹¹¡¢¡¢¡¢¡¢Ò»Ö±µ½×îµ×²ãµÄ»ú¹¹¡£
2¡¢upbidÊÇÖ¸Éϼ¶»ú¹¹µÄID¡£º£µíÇø»ú¹¹ID(b ......