תVB ×Ö·û´®´¦Àíº¯Êý¼¯ ÊÕ²Ø
VB ×Ö·û´®´¦Àíº¯Êý¼¯
ÊÕ²Ø
mid(×Ö·û´®£¬´ÓµÚ¼¸¸ö¿ªÊ¼£¬³¤¶È)
ÔÚ[×Ö·û´®]ÖÐ[´ÓµÚ¼¸¸ö¿ªÊ¼]È¡³ö[³¤¶È¸ö×Ö·û´®]
ÀýÈç mid("СÐÀÎÞµÐ",1,3) Ôò·µ»Ø "СÐÀÎÞ"
instr(´ÓµÚ¼¸¸ö¿ªÊ¼,×Ö·û´®1,×Ö·û´®2)
´Ó¹æ¶¨µÄλÖÿªÊ¼²éÕÒ£¬·µ»Ø×Ö·û´®2ÔÚ×Ö·û´®1ÖеÄλÖÃ
ÀýÈç instr(1,"СÐÀÎÞµÐ","С") Ôò·µ»Ø 1,instr(2,"СÐÀÎÞµÐ","С")£¬Ôò·µ»Ø 0 ¡£ 0 ±íʾδÕÒµ½
InStrRev(×Ö·û´®1,×Ö·û´®2,´ÓµÚ¼¸¸ö¿ªÊ¼)
´Ó¹æ¶¨µÄλÖÿªÊ¼£¬´Óºóסǰ²éÕÒ£¬·µ»Ø×Ö·û´®2ÔÚ×Ö·û´®1ÖеÄλÖ㬴˴¦×¢Ò⣬ËäÊÇ´Óºóסǰ²éÕÒ£¬µ«ÊÇ·µ»ØµÄÖµ»¹ÊÇ´ÓÇ°ÍùºóËãµÄ¡£
ÀýÈç instrRev("СÐÀÎÞµÐ","С",2) Ôò·µ»Ø 2 ; instrRev("СÐÀÎÞµÐ","ÐÀ",1) Ôò·µ»Ø 0 ,ÒòΪËü´Ó"СÐÀÎÞµÐ"µÄµÚ1¸ö×Ö¿ªÊ¼ÍùÇ°²éÕÒ£¬ËùÒÔÕÒ²»µ½ ¡£0 ±íʾδÕÒµ½
left(×Ö·û´®,³¤¶È)
´Ó[×Ö·û´®]µÄ×ó±ß¿ªÊ¼·µ»Ø[³¤¶È]¸ö×Ö·û
ÀýÈç Left("СÐÀÎÞµÐ,3) Ôò·µ»Ø "СÐÀÎÞ"
right(×Ö·û´®,³¤¶È)
´Ó[×Ö·û´®]µÄÓұ߿ªÊ¼·µ»Ø[³¤¶È]¸ö×Ö·û
ÀýÈç Right("СÐÀÎÞµÐ",3) Ôò·µ»Ø "ÐÀÎÞµÐ"
ucase(×Ö·û´®)
·µ»Ø[×Ö·û´®]µÄ´óдÐÎʽ£¬Ö»¶ÔÓ¢ÎÄ×Ö·ûÓÐЧ
ÀýÈç ucase("xiaoXINwuDi") Ôò·µ»Ø "XIAOXINWUDI"
lcase(×Ö·û´®)
·µ»Ø[×Ö·û´®]µÄСдÐÎʽ£¬Ö»¶ÔÓ¢ÎÄ×Ö·ûÓÐЧ
ÀýÈç lcase("xiaoXINwuDi") Ôò·µ»Ø "xiaoxinwudi"
asc(×Ö·û)
·µ»Ø[×Ö·û]µÄascii±àÂ룬ÈôÓжà¸ö×Ö·û£¬ÔòÖ»·µ»ØÊ××Ö·ûµÄascii±àÂë,ºÍChr()º¯ÊýÊÇÒ»¸ö¿ÉÄæµÄ¹ý³Ì
ÀýÈç asc("С") Ôò·µ»Ø -12127 ; asc("СÐÀÎÞµÐ") Ò²·µ»Ø -12127
chr(ASCii±àÂë)
·µ»Ø[Ascii]±àÂëËù´ú±íµÄ×Ö·û£¬ºÍChr()º¯ÊýÊÇÒ»¸ö¿ÉÄæµÄ¹ý³Ì
ÀýÈç chr(-12127) Ôò·µ»Ø "С" £»chr(asc("С")) Ôò·µ»Ø"С"(ÕâÀïÊÇΪÁË˵Ã÷ascºÍchrµÄ¿ÉÄæÐÔ£¬ÀýÓôËÌØÐÔ¿ÉÒÔ¼ÓÃÜÎı¾)
trim(×Ö·û´®)
·µ»ØÈ¥µôÁËÇ°¡¢ºóÖ®ºóµÄ[×Ö·û´®]
ÀýÈç trim(" С ÐÀ Î޵Р") Ôò·µ»Ø "С ÐÀ ÎÞµÐ" £¬Ö
Ïà¹ØÎĵµ£º
ÔÚVBÖÐÒªÏëµ÷ÓÃExcel£¬ÐèÒª´ò¿ªVB±à³Ì»·¾³“¹¤³Ì”²Ëµ¥ÖеēÒýÓÔÏîÄ¿£¬²¢Ñ¡È¡ÏîÄ¿ÖеēMicrosoft Excel 11.0 object library”Ïî¡£ÓÉÓÚÄãµÄExcel°æ±¾²»Í¬£¬ËùÒÔÕâ¸öÑ¡ÏîµÄ°æ±¾ºÅÒ²ÊDz»Í¬µÄ¡£
ÒòΪEXCELÊÇÒÔ²ã´Î½á¹¹×éÖ¯¶ÔÏóµÄ£¬Æä¶ÔÏóÄ£ÐÍÖк¬ÓÐÐí¶à²»Í¬µÄ¶ÔÏóÔªËØ¡£
&n ......
'´´½¨Êý¾Ý¿â
Private Sub Create(ByVal mdbPath As String)
If File.Exists(mdbPath) Then
Throw New Exception("Ä¿±êÊý¾Ý¿âÒѾ´æÔÚ£¬ÎÞ·¨´´½¨")
......
ÕªÒª£º ±¾ÎIJûÊöÁËÔÚVB³ÌÐòÖÐÀûÓÃADO¶ÔÏó¶¯Ì¬´´½¨Êý¾Ý¿âºÍÊý¾Ý±íµÄ·½·¨£¬ÕâЩ·½·¨ÔÚ¿ª·¢VBÊý¾Ý¿âÓ¦ÓóÌÐòÖкÜÓÐʵÓüÛÖµ£¬Ëü¿ÉÒÔÌá¸ßÊý¾Ý¿â³ÌÐòÁé»îÐÔ¡£
¡¡¡¡¹Ø¼ü´Ê£ºÊý¾Ý¿â¡¢Êý¾Ý±í¡¢ADO¡¢ADOX
¡¡¡¡1: ÎÊÌâµÄÌá³ö
¡¡¡¡ÔÚVisual BasicÖУ¬³£ÓõÄÊý¾Ý·ÃÎʽӿÚÓÐÏÂÁÐÈýÖÖ£ºÊý¾Ý¿â·ÃÎʶÔÏó(DAO£¬Data A ......
ÕýÔÚ¿ª·¢Ð¡ÃØÊéϵͳ²¢²»¶ÏÌá¸ßÆäÖÇÄÜˮƽ,ÆäÖÐÓõ½µÄÊǽű¾Ö§³ÖµÄ¼¼Êõ
ËäÈ»Õⲿ·Ö²»ÊôÓÚ³õѧÕßʹÓÃ,È»¶øÓÐЩÈËÏëѧÕâ¸ö¶«¶«,ÕâÀï¾Í·¢~~~²¼³öÈ¥°É!
н¨Ò»¸ö±ê×¼exe¹¤³Ì(Standard EXE);
"¹¤³Ì"(Project)-->"²¿¼þ"(Components)
Ñ¡¶¨"Microsoft Script Control 1.0" ,λÖÃÊÇC:\WINDOWS\system32\msscript.ocx
Ìí ......