Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Pro*C SQLDA ½á¹¹Ìå

--Õª×Ô ¡¶Oracle Pro*C ³ÌÐò¿ª·¢¡·     --Create/Modify Email£ºxingchengli@gmail.com
SQLDA µÄ½á¹¹ÈçÏ£º
struct SQLDA
{
long N; /* Descriptor size in number of entries */
char **V; Ptr to Arr of addresses of main variables */
long *L; /* Ptr to Arr of lengths of buffers */
short *T; /* Ptr to Arr of types of buffers */
short **I; * Ptr to Arr of addresses of indicator vars */
long F; /* Number of variables found by DESCRIBE */
char **S; /* Ptr to Arr of variable name pointers */
short *M; /* Ptr to Arr of max lengths of var. names */
short *C; * Ptr to Arr of current lengths of var. names */
char **X; /* Ptr to Arr of ind. var. name pointers */
short *Y; /* Ptr to Arr of max lengths of ind. var. names */
short *Z; /* Ptr to Arr of cur lengths of ind. var. names */
};
SQLDA½á¹¹³ÉÔ±×÷ÓÃÃèÊö£º
Ãû³Æ ÃèÊö
N SELECT-LISTÁлòռλ·ûµÄ×î´óÊýÁ¿£¬Ö´ÐÐDESCRIBEÇ°±ØÐëÖ´ÐÐ
SQLSQLDAAlloc()º¯Êý¸øN½øÐи³Öµ£¬É趨ÃèÊöÊý×éµÄάÊý£¬Æä¾ö¶¨ÁËÃèÊö×ֽṹ³É
Ô±Êý×éµÄ×î´óÔªËظöÊý¡£ÔÚDESCRIBEÃüÁîºó£¬±ØÐ뽫´æ´¢ÔÚFÖеıäÁ¿Õæʵ¸öÊý¸³
Öµ¸øN¡£
V ÊÇÒ»¸öÖ¸ÏòÒ»¸öµØÖ·Êý×éµÄÖ¸Õ룬ÔÚ¸ÃÊý×éÖд洢SELECT-LISTÁÐÖµ»ò°ó¶¨±ä
Á¿µÄÖµ¡£µ±Ê¹ÓÃSQLSQLDAAllocº¯Êýʱ£¬ÏµÍ³¸øV[0]µ½V[n-]¸³ÖµÎª0¡£ÔÚʹÓÃselect
descriptorsʱ£¬±ØÐëÔÚFETCHÓï¾äÇ°£¬¸øVÖ¸ÕëÊý×é·ÖÅäÄÚ´æ¿Õ¼ä£¬Ó¦ÎªÏÂÁÐÓï¾äÒª
Óõ½Á½ÖÖÃèÊö×Ö¾ßÌåµÄÖµ£º
EXEC SQL FETCH ... USING ‘select descriptors’
¶ÔÓÚbind descriptors,±ØÐëÔÚOPENÓï¾äÇ°·ÖÅä¿Õ¼ä
EXEC SQL OPEN ... USING ‘bind descriptors’
L LÊÇÒ»¸öÖ¸Ïò´æ·Åselect-list»òbind-variable±äÁ¿Öµ³¤¶ÈÊý×éµÄÖ¸Õë¡£¶ÔÓÚselect
descriptors£¬DESCRIBE SELECT LISTÓï¾äÉèÖÃÊý×éÖи÷ÔªËصÄÖµ£¬¶Ô²»ÔÚselect-list
µÄ¶ÔÓ¦³¤¶ÈÉèÖóɸÃÀàÐ͵ĿɵĶ¨ÒåµÄ×î´ó³¤¶È¡£ÔÚFETCHÓï¾äÇ°£¬Óû§¿ÉÄÜÐèÒª
ÖØÐÂÐ޸ıäÁ¿³¤¶È£¬±ÈÈçΪÁËÏÔʾԭÒò£¬ÐèÒª½«NUMBERÀàÐÍÊý¾Ý´æ´¢µ½CÓïÑÔchar[]
ÀàÐÍ£¬¾ÍÐèҪͨ¹ýSQLNumberPrecV6()º¯ÊýµÃµ½NUMBER³¤¶È£¬È»ºóת»»³É×Ö·û´®
ºóµÄÕæʵ³¤¶È¡£
¶ÔÓÚbind descriptors£¬Óû§±ØÐëÔÚOPENÓï¾äÇ°£¬¸øÊý×é³ÉÔ±¸³¶ÔÓ¦V±äÁ¿³ÉÔ±


Ïà¹ØÎĵµ£º

´´½¨ÖîÈç "c:\a\b\c\d\yeah.log"Öеĸ÷¼¶Îļþ¼Ð

×î½üά»¤Logger¹²Ïí¿âµÄʱºòÐÂÔöÁ˸üÈËÐÔ»¯µÄ×Ô¶¯´´½¨¸÷¼¶Ä¿Â¼µÄ¹¦ÄÜ£¬ÏÂÃæÊÇÎÒʵÏÖ´´½¨ÖîÈç "c:\a\b\c\d\yeah.log"Öеĸ÷¼¶Îļþ¼ÐµÄ¹ý³Ì£¬Çë´ó¼ÒÖ¸½Ì£¡
BOOL CreateDirectoryInPathW(const wchar_t *sLogPath)
{
 static BOOL bRet = 0;
 CString csFullDir(_T(""));//ԭʼȫ·¾¶
 int nLen = 0;//Ô­Ê ......

¾­µäC/C++ÃæÊÔÌ⣨Î壩

ÄÜ£¬¾Ö²¿»áÆÁ±ÎÈ«¾Ö¡£ÒªÓÃÈ«¾Ö±äÁ¿£¬ÐèҪʹÓÃ"::"
¾Ö²¿±äÁ¿¿ÉÒÔÓëÈ«¾Ö±äÁ¿Í¬Ãû£¬ÔÚº¯ÊýÄÚÒýÓÃÕâ¸ö±äÁ¿Ê±£¬»áÓõ½Í¬ÃûµÄ¾Ö²¿±äÁ¿£¬¶ø²»»áÓõ½È«¾Ö±äÁ¿¡£¶ÔÓÚÓÐЩ±àÒëÆ÷¶øÑÔ£¬ÔÚͬһ¸öº¯ÊýÄÚ¿ÉÒÔ¶¨Òå¶à¸öͬÃûµÄ¾Ö²¿±äÁ¿£¬±ÈÈçÔÚÁ½¸öÑ­»·ÌåÄÚ¶¼¶¨ÒåÒ»¸öͬÃûµÄ¾Ö²¿±äÁ¿£¬¶øÄǸö¾Ö²¿±äÁ¿µÄ×÷ÓÃÓò¾ÍÔÚÄǸöÑ­»·ÌåÄÚ¡£
2¡¢ÈçºÎÒýÓ ......

C±à³ÌʵÏÖhttpЭÒé


´ó¼Ò¶¼ºÜÊìϤHTTPЭÒéµÄÓ¦Óã¬ÒòΪÿÌ춼ÔÚÍøÂçÉÏä¯ÀÀ×Ų»ÉÙ¶«Î÷£¬Ò²¶¼ÖªµÀÊÇHTTPЭÒéÊÇÏ൱¼òµ¥µÄ¡£Ã¿´ÎÓÃthunderÖ®ÀàµÄÏÂÔØÈí¼þÏÂÔØÍøÒ³£¬µ±Óõ½ÄǸö“ÓÃthunderÏÂÔØÈ«²¿Á´½Ó”ʱ×ܾõµÃºÜÉñÆæ¡£
ºóÀ´ÏëÏ룬ÆäʵҪʵÏÖÕâЩÏÂÔع¦ÄÜÒ²²¢²»ÄÑ£¬Ö»Òª°´ÕÕHTTPЭÒé·¢ËÍrequest£¬È»ºó¶Ô½ÓÊÕµ½µÄÊý¾Ý½øÐзÖÎö£¬Èç¹ûÒ ......

ÓïÑÔ»ì±àÖ®javaµ÷ÓÃc dll jni¼¼ÊõСÊÔ

¸Õ´ÓÍøÉÏ¿´µ½cºÍjava»ì±àµÄÎÄÕ£¬¾Íؽ²»¿É´ýµÄ³¢ÊÔÁËһϡ£ºÇºÇ£¬Ð§¹û»¹ÊǺܺõġ£ÏÂÃ潫×Ô¼º³É¹ûÕ³Ìù³öÀ´
£¨×ªÔØÓÚhttp://www.zxbc.cn/html/20070518/19986.html£©¡£ÊµÑéÖ®ºó¿ÉÒÔͨ¹ý¡£
1javaÖе÷ÓÃcÓïÑÔ
Ê×ÏȱàдMain.java
public class Main 
{
 public native static int getStrNum(byte str[], int s ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ