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

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
Dim lngTotalSize As Long
Dim strChunk As String
Dim MediaID As Long
On Error Resume Next
DataFile = FreeFile
Open Filen For Binary Access Write As DataFile
lngTotalSize = filed.ActualSize
Chunks = lngTotalSize \ ChunkSize
Fragment = lngTotalSize Mod ChunkSize
'ReDim Chunk(ChunkSize)
ReDim Chunk(Fragment)
Chunk() = filed.GetChunk(ChunkSize)
Put DataFile, , Chunk()
lngOffset = lngOffset + ChunkSize
Do While lngOffset < lngTotalSize
   Chunk() = filed.GetChunk(ChunkSize)
   Put DataFile, , Chunk()
   lngOffset = lngOffset + ChunkSize
Loop
Close DataFile
End Sub
'дÊý¾Ýµ½¶þ½øÖÆ×Ö¶Î
Public Sub SaveToBLOB(fieldBLOB As ADODB.Field, filename 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
Dim lngTotalSize As Long
Dim strChunk As String
Dim MediaID As Long
DataFile = FreeFile
Open filename For Binary Access Read As DataFile
    Fl = LOF(DataFile)    ' ÎļþÖÐÊý¾Ý³¤¶È
    If Fl = 0 Then
       Close DataFile
    Else
    Chunks = Fl \ ChunkSize
    Fragment = Fl Mod ChunkSize
    'If Chunks <= 0 Then Chunks = 1
    ReDim Chunk(Fragment)
    Get DataFile, , Chunk()
    fieldBLOB.AppendChunk Chunk()
    ReDim Chunk(ChunkSize)
   
    For i = 1 To Chunks
     Get DataFile, , Chunk()
  &n


Ïà¹ØÎĵµ£º

VBÉèÖýø³ÌÓÅÏȼ¶

http://topic.csdn.net/t/20060401/19/4656391.html
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
Private Declare Function SetPriorityClass Lib "kernel32" (ByVal hProcess As Long, ByVal dwPriorityClass As Long) As Long
Const IDLE_PRIORITY_CLASS = &H40 'нø³ÌÓ¦¸ÃÓзdz£µÍµÄ ......

VBʵÏÖÅúÁ¿Ãû³ÆÐÞ¸Ä

ǰÕó×ÓдÁËÒ»¸öĿ¼Ãû/ÎļþÃûµÄ»ñȡС³ÌÐò£¬ÕâÁ½Ìì¾ÓÈ»ÓÖ±»Ãû³ÆÅúÁ¿ÐÞ¸ÄÂé·³ÁËһϣ¬ËùÒÔÔÙдһ¸ö°É¡£
×¢Ò⣺ÄãÒªÊÇÖ»Ïëдһ´ÎµÄ»°£¬ÓÃÅú´¦Àí¸ü·½±ã¡£Ö»Óжà´ÎʹÓõÄÇé¿öÏ£¬×Ô¼ºÐ´³ÌÐò²ÅÓÐÒâÒå¡£
VBÖнøÐÐÃû³ÆÐ޸ĺÜÈÝÒ×,Óõ½µÄ¾ÍÊÇNameÕâ¸öº¯Êý£¬Ó÷¨ÈçÏ£º
Name OldName As NewName£¬Ëü²»½ö¿ÉÒÔ¸ÄдÃû³Æ£¬¶øÇÒ¿ÉÒÔ¸ü¸ ......

VB¾ÖÓòÍøÉ¨Ãè

   ×î½üÓÉÓÚ¹¤×÷ÏîĿԭÒò£¬ÁÙʱҪÇó×öÒ»¸ö¾ÖÓòÍøÉ¨ÃèÈí¼þ¡£¹¦ÄÜÒªÇó£¬É¨Ãè³öIPµØÖ·ÒÔ¼°¶ÔÓ¦µÄMACµØÖ·¡£¹¦ÄܱȽϼòµ¥¡£ÓÚÊǺܿì¾Í×öÁË¡£²ÉÓõĿª·¢¹¤¾ßÊÇ VB6.0
     ʹÓ÷½·¨ÊÇͨ¹ý·¢ËÍ ARP°ü£¬¹ã²¥ IPµØÖ·µÄ·½Ê½À´»ñµÃ ¶ÔÓ¦µÄ MACµØÖ·£¬SendARP£¨£©¡£
ÓÐһЩϸ½ÚҪעÒ⣬¾ÍÊÇ Êä³öMACµØÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ