C++¶ÔsqlµÄ²Ù×÷ - C/C++ / ÆäËü¼¼ÊõÎÊÌâ
ÎÒÏëͨ¹ýODBCÀ´²Ù×÷Êý¾Ý±í£¬µ«È´ÕÒ²»µ½×Ô¼ºÐ½¨µÄ±í£¬Ö»ÓÐн¨Êý¾Ý¿âʱ×Ô¶¯Éú³ÉµÄ±í
Ç¿µ÷£ºÔÚÆóÒµ¹ÜÀíÆ÷ÖÐÄÜÕÒµ½ÎÒ½¨µÄ±í
ÄÄλ³öÏÖ¹ýÀàËÆÎÊÌ⣿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¾È¾ÈÎÒ°É¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢
ÄãÈ·¶¨ÄǸöÊÇÔÚͬһ¸öÊý¾Ý¿âÖУ¿ ·ÃÎÊȨÏÞÄØ
Äãн¨µÄ±í±£´æÁËÂð£¿Ã»±£´æµÄ»°£¬Êǿ϶¨¿´²»µ½µÎ
²»¹ý²»ÖªµÀLZÊÇÕÒ²»µ½±í£¬»¹ÊÇÕÒ²»µ½Êý¾Ý¿â
±£´æÁË£¬Ò²ÔÚͬһ¿âÖУ¬¶øÇÒÎÒÖØÆôÖ®ºó»¹ÄÇÑù
ÔÚÆóÒµ¹ÜÀíÆ÷ÖпÉÒÔÕÒµ½£¬µ«Í¨¹ýODBC½øÈëÊý¾Ý¿â¾ÍÕÒ²»µ½×Ô¼º½¨µÄ±í
Äã½øÈ¥ÁËûÓУ¿
ÄÜÕÒµ½ÆäËû±íÂ𣿣¨SQLserver2000ºÃÏñ×Ô´øһЩ±í£©
ÊDz»ÊÇͬһ¸öÓû§°¢£¿
ÓпÉÄÜÊÇ·ÃÎÊȨÏÞµÄÎÊÌ⣬ÄãÔÚ×¢²áODBCÊý¾ÝԴʱһ¶¨ÒªÊǾßÓзÃÎʸñíȨÏÞµÄÕË»§
ÆäËû±í¶¼Õҵõ½£¬¾ÍÀàÐÍΪ¡°Óû§¡±µÄ±íÕÒ²»µ½
ÎÒÔçÉÏ»¹ÄÜÕÒµ½£¬µ«Ö®ºóÎÒ½«ÄǼ¸¸ö±íɾÁË£»ÔÙ½¨Á˼¸¸ö±íºó¾ÍÕÒ²»µ½ÁË
ÖØÐÂ×¢²áODBCÊý¾ÝÔ´ÊÔÊÔ
²âÊÔÒ»ÏÂODBCºÍÊý¾ÝÔ´µÄͨѶÕý³£Âð¡£»¹ÓÐÊý¾Ý¿âÓû§µÄȨÏÞÒ²ÔÚODBCÀï¼ì²âһϡ£
ÎÊÌâ³öÔÚͨѶºÍȨÏÞÉÏ£¬×Ðϸ¼ì²éһϿ϶¨ÄÜÕÒµ½£¡
½â¾öÁË£¬Ð»Ð»¸÷λ¡£¡£¡£
Ïà¹ØÎÊ´ð£º
ÇëÎÊVFPÖÐÈçºÎµ÷ÓÃC/C++º¯Êý£¿
ÄãÒªµ÷ÓÃʲô¹¦Äܵĺ¯Êý£¿Òª¿´¿´VFPÖÐÓÐûÓжÔÓ¦µÄº¯Êý£¬Èç¹ûÓоÍÊ¡×ÅÔÙµ÷ÓÃÁË¡£Èç¹ûûÓУ¬¿ÉÒÔ½«C/C++º¯Êýд¸öDLL»òFLL£¬È»ºóÔÚVFPµ÷Óü´¿É¡£
Ê®¶¹Èý ÀÏʦ£¬Ôõô²ÅÄÜÐÞ¸Ä×Ô¼ºµÄ ......
×Ö¶Î1,×Ö¶Î2.....×Ö¶ÎN,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
ÏëÒªµÄ½á¹ûÊÇ:
1,Na ......
ÈçºÎ½«Ò»¸öListBoxÖеÄÊý¾Ý´æÔÚÊý¾Ý¿âÖеÄÒ»¸ö×Ö¶ÎÏÂÃ棬²¢ÇÒÿÌõ¼Ç¼µÄ×Ö·û´®¸öÊý²»Ò»¶¨ ÒÔ¼°ÈçºÎ´ÓÊý¾Ý¿âÖжÁÈ¡¸ÃListBoxÖеÄËùÓмǼ
C/C++ code:
//´æÈëÊý¾Ý¿â
void __fastcall TForm1::Button5Click(TO ......
ÕâÀïÏëÁ˽âÏ£¬¹ØÓÚSQL ServerÖзÖÒ³ºÍOracleÖзÖÒ³£»
ƽ³£Ð´Ó¦ÓóÌÐòµÄʱºò£¬±ÈÈçÓõÄÓïÑÔÊÇJava£¬ÓиöÁбíÒ³Ã棬ÐèÒª¶ÔÊý¾Ý·ÖÒ³ÏÔʾ£»
ÕâÀïÒª·ÖÒ³ÄѵÀ²»ÐèÒª½èÖúJava£¬¶øÖ±½ÓsqlÄÜÖªµÀ·ÖÒ³Âð£¬ÆðÂëÒ²Òª´«¸öÒ³Âë½ ......
¸÷λºÃ£¬ÎÒ¸Õ°ÑÒ»¸öASPÍøÕ¾ÉèÖúÃÁË£¬Ò²ÄÜÕý³£·ÃÎÊ¡£µ«ÊÇÔÚÎÒ±¾»úÉϲ»ÄÜ´ò¿ªadmin\login.asp,ËùÒÔÎÞ·¨ÊµÏÖºǫ́¹ÜÀí¡££¨´íÎóÌáʾÎÞ·¨ÕÒµ½ÍøÒ³£¬´úÂë404£¬ÎҵIJÙ×÷ϵͳÊÇwin2000 server)
µ«ÊÇÆæ¹ÖµÄÊÇÔÚ¾ÖÓòÍøµÄÆäËû» ......