vb Á¬½ÓÊý¾ÝÀý×Ó
'¹¤³Ì-->ÒýÓà Ìí¼Ó Microsoft activex data objects 2.5 library
'¹¤³Ì-->²¿¼þ Ìí¼Ó Microsoft flexgrid control 6.0
Dim Cnn As New ADODB.Connection
Cnn.ConnectionString = "Provider=microsoft.jet.oledb.4.0;data source=E:\Access DB\Database1.mdb;"
If Cnn.State <> ADODB.ObjectStateEnum.adStateClosed Then Cnn.Close
Cnn.Open
Dim Rs As ADODB.Recordset
Set Rs = New ADODB.Recordset
With Rs
Set .ActiveConnection = Cnn
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open "SELECT good_code,customer,sum(price*amount)/sum(amount) AS avg_price from sales GROUP BY good_code,customer"
If .RecordCount > 0 Then
MSFlexGrid1.Clear
MSFlexGrid1.Cols = 3
MSFlexGrid1.Rows = .RecordCount + 1
MSFlexGrid1.TextMatrix(0, 0) = "ÉÌÆ·±àºÅ"
MSFlexGrid1.TextMatrix(0, 1) = "¹Ë¿ÍÃû³Æ"
MSFlexGrid1.TextMatrix(0, 2) = "ƽ¾ù¼Û¸ñ"
.MoveLast: .MoveFirst
For i = 1 To .RecordCount
MSFlexGrid1.TextMatrix(i, 0)
Ïà¹ØÎĵµ£º
¡¡¡¡SQLDMO£¨SQL Distributed Management Objects£¬SQL·Ö²¼Ê½¹ÜÀí¶ÔÏ󣩷â×° Microsoft SQL Server 2000 Êý¾Ý¿âÖеĶÔÏó¡£SQL-DMO ÔÊÐíÓÃÖ§³Ö×Ô¶¯»¯»ò COM µÄÓïÑÔ±àдӦÓóÌÐò£¬ÒÔ¹ÜÀí SQL Server °²×°µÄËùÓв¿·Ö¡£ SQL-DMO ÊÇ SQL Server 2000 ÖÐµÄ SQL Server ÆóÒµ¹ÜÀíÆ÷ËùʹÓõÄÓ¦ÓóÌÐò½Ó¿Ú (API);Òò´ËʹÓà SQL-DMO µÄÓ ......
VBÎÞËù²»ÄÜÖ®ÆߣºVBµÄ¶àỊ̈߳¨1£©
×÷ÕߣºÖÓÉù
ÌâÍâ»°£º
×î½ü£¬Ð´Á˼¸Æª¡¶VBÎÞËù²»ÄÜ¡·ÏµÁУ¬±¾ÏµÁÐÎÄÕµĴ´×÷³õÖÔ¾ÍÊÇҪȥµß¸²ÖÚ¶à³ÌÐòÔ±¶ÔÓÚ“·ÇÃæÏò¶ÔÏó”ÓïÑÔ“VB”µÄ³É¼û£¡
µ±È»£¬ÎÒÒ²ÔçÓÐÔ¤ÆÚ£¬´ËÑÔÒ»³ö±ØÈ»ÕÐÖ²»Ã÷ÕæÏàµÄȺÖڵēΧ¹¥”£¬È»¶ø£¬ÎÒ»¹ÊÇÒª¼ ......
×ö¸ömp3²¥·ÅÆ÷£¬ÓÃrealplayºÍWMP×ö³öÀ´µÄ³ÌÐòÄÚ´æÕ¼ÓÃÌ«´ó¡£
Èç¹ûÄã½ö½öÊDz¥·ÅMP3£¬½¨ÒéʹÓÃAPIº¯ÊýmciSendString¡£
Option Explicit
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal
lpstrReturnString As String, ByVal uReturnLength As Lo ......
¡¡¡¡ÐÅÏ¢¼à¿ØÓëÒþ˽±£»¤ÓÀÔ¶ÊÇÒ»¶Ôì¶Ü¡£
ÔÚ¶Ô¸¶¸÷ÖÖÐÅÏ¢ÇÔÈ¡Èí¼þÉÏ¡£
м¼Êõ×ÜÊDzã³ö²»Çî¡£±¾ÎĽéÉÜÒ»ÖÖ¹ÅÀϵļüÅ̼ǼÆ÷¼¼Êõ£¬È·ÊµºÜ¹ÅÀÏ¡£
DOSʱ´úÈËÃǾÍÔÚÓÃÁË¡£
µ«ÊÇÏÖÔÚËüÈÔÈ»ºÜÓÐЧ£¬ÔÚ¼üÅ̹ýÂËÇ ......
Try
Dim Path As String = Server.MapPath("~/Download/") 'Îļþ·¾¶
Path = Path & "file.txt" 'ÎļþµÄÃû³Æ
......