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

VBÖÐfilesystemobject¶ÔÏóʵÏÖÎļþ´æÈ¡·½·¨

×î¼òµ¥µÄ·½·¨ÊÇʹÓÃfilesystemobject¶ÔÏ󡣶øËü²¢·ÇVBÄÚÖöÔÏó£¬
ÐèÒýÓòſÉÒÔʹÓá£
1£®filesystemObject¶ÔÏóÒýÓÃ
“¹¤³Ì/ÒýÓÃ/microsoft scription Runtime”
 ÔÚ¶ÔÏóä¯ÀÀÆ÷´°¿ÚÖÐÑ¡“scripting”Ä£¿é£¬¿´µ½ÔöÁËÐí¶à¶ÔÏó£¬
drive filesystemobject    textstream    fileµÈ
ÆäÖÐfilesystemobjectÊÇÕâЩ¶ÔÏóµÄ¹Ø¼ü£¬ÏëҪʹÓÃÆäËü¶ÔÏó£¬
¶¼±ØÐëÏȽ¨Á¢filesystemobject¶ÔÏó¡£
£²£®Îļþ´æÈ¡
 dim fs  as  new  filesystemobject  ½¨Á¢filesystemobject¶ÔÏó
 dim  txtf  as  textstream          ¶¨ÒåÁËÒ»¸ötextstream¶ÔÏó±äÁ¿
textstrem¶ÔÏóÓëÎļþµÄ¶ÁдËùÓÐÎļþ¶¼±ØÐëÏÈ´ò¿ª£¬²ÅÄܶÁд£¬
filesystemobjet¶ÔÏóËùÌṩµÄ´ò¿ªÎļþµÄ·½·¨ÓÐÁ½ÖÖ£º
opentextfile  ´ò¿ªÎļþ
createtextfile  ½¨Á¢Îļþ
 Í¨¹ýfilesystemobjectËù´ò¿ªµÄÎļþÊÇÒ»¸öTextStream¶ÔÏó£¬
¶øͨ¹ýtextstream¶ÔÏóµÄ¸÷ÖÖ·½·¨ºÍÊôÐÔ£¬¾Í¿ÉÒÔ½øÒ»²½¶ÁдÎļþ¡£
 1£©opentextfile  ·½·¨£º´ò¿ªÎļþ
set  textstream¶ÔÏóÃû=filesystemobjectÃû.opentextfile(ÎļþÃû£¬IOģʽ£¬ÊÇ·ñ×Ô¶¯½¨Á¢Îļþ£©
ÎļþÃû£º½¨ÒéдÈëÍêÕû·¾¶µÄÎļþÃû¡£
IOģʽ£º¿ÉÉèÖóÉforreading(=1)¡¢forwrting(=2)»òforappending(=8)¡£       
Èç¹ûÉèÖóÉforreading£¬Ôò´ò¿ªµÄÎļþÊÇÖ»¶ÁµÄ£»
Èç¹ûÉèÖóÉforwriting£¬Ôò´ò¿ªµÄÎļþÊÇ¿ÉдµÄ£¬¶øÔ­À´Îļþ                     µÄÄÚÈݻᱻÇå³ý£»
Èç¹ûÉèÖóÉforappending£¬Ôò´ò¿ªµÄÎļþÊÇ¿ÉдµÄ£¬µ«Ô­Îļþ             µÄÄÚÈݲ»»á±»Çå³ý£¬Êý¾Ý»á´ÓÎļþ             µÄ×îºóÃ濪ʼдÈë¡£
²ÎÊýȱʡ£º   ±íʾforreading Ö»¶Á¡£
ÊÇ·ñ×Ô¶¯½¨Á¢Îļþ£º¿ÉÉèÖóÉtrue»òfalse¡£
ÉèÖÃΪ£ºtrue     Ôòµ±Îļþ²»´æÔÚʱ£¬»á×Ô¶¯                      


Ïà¹ØÎĵµ£º

vb ±£´æͼƬµ½Êý¾Ý¿â

'¶ÁÊý¾Ýµ½¶þ½øÖÆ×Ö¶Î
Public Sub ReadfromBLOB(filed As ADODB.Field, Filen As String)
Dim DataFile As Integer, Fl As Long, Chunks As Integer
Dim Fragment As Integer, Chunk() As Byte, i As Integer
'´«ËͿ鵥λ´óС
Const ChunkSize As Integer = 16384
Dim MediaTemp As String
Dim lngOffset As Long
Di ......

ʹÓÃVB½«Excelµ¼Èëµ½SqlÖÐ

ʹÓÃVB°ÑExcelµ¼Èëµ½SqlÊý¾Ý¿âÖУ¬ÆäʵÓм¸ÖÖ·½·¨¡£
ÏÂÃæÎÒ½éÉܵÄÕâÖÖ·½·¨£¬½ÏΪ¼òµ¥¡£
ÆäʵÕâÖÖ·½·¨µÄ»°£¬ÊÇÖ±½ÓʹÓÃT-SQL²Ù×÷µÄ£¬Òò´Ë£¬µ½ÁËVBÀïÃ棬ֱ½ÓeccuteÕâ¸ö´úÂë¾ÍOKÁ˵ġ£
-----------------------------------------------------ÏÂÃæÊÇÔÚT-sqlÖеÄÓï¾ä
if object_id('NewTable') is not null/*ÅжϱíNewTabl ......

VBÖеÄcommand

ÔÚ¿ª·¢IP-MACɨÃè¼àÊÓÆ÷ʱ£¬ÉèÖÃÁË¿ª»ú×Ô¶¯ÔËÐУ¬µ«Êǵ±WINDOWSÆô¶¯ºó£¬³ÌÐòÔËÐкóÈ´´ò¿ª´°ÌåÁË£¬²»ÊÇ×îС»¯ÔËÐеġ£ÕâÔõô°ìÄØ£¿ÓÚÊÇÏëµ½¼ÓÒ»¸ö²ÎÊý¸ø³ÌÐòÆô¶¯Ê±£¬µ«²»ÖªµÀÔõôʵÏÖ£¬½á¹û·¢ÏÖVBÖÐÓÐcommand£¬ÊÇ¿ÉÒÔ½ÓÊܲÎÊýµÄ¡£Ö±½Ó£ºAAA.EXE xxx,
ÔÚ³ÌÐòÖÐÓÃÒ»¸ö±äÁ¿µÃµ½Õâ¸ö²ÎÊý£¬ÄǾͿÉÒÔÁË¡£×ö·¨£º
1¡¢ÔÚ×¢²á±í×ÔÆô¶ ......

»ñµÃVB listbox Ñ¡ÖÐÏîÄ¿(¶àÏî)µÄÒ»¸öºÃ·½·¨

´«Í³·½·¨ÊDZéÀúÒ»±é
Èç¹ûlistbox ÏîÄ¿¹ý¶à
Ã÷ÏÔËٶȲ»ÐÐ
ºÃ·½·¨ÊÇͨ¹ýsendmessge·¢ÏûÏ¢¸ølistboxÈÃËû°ÑÑ¡ÖÐÏîÄ¿Ö±½Ó´«µ½²ÎÊýÊý×éÖÐ
You can use the SendMessage() API function instead.
As
you probably know, this function lets you send a message to one or more
windows. The declaration statement conforms ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ