ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¦p¦ó¥i¥H§ì¨ìÀɮתº³Ì«á¤@µ§¸ê®Æ?

¦p¦ó¥i¥H§ì¨ìÀɮתº³Ì«á¤@µ§¸ê®Æ?

§Ú·Q¨ú±o³Ì«á¤@µ§¸ê®Æªº Record Number, §ä¹M¤FMSDN ¤Wªº¦³Ãö BOTTOM ªº¸ê°T,¦ý¬O没§ä¨ì,²{¦b¥u¦n¥Î¤gªkÁå¿ûªº¤èªk¦p¤U©Ò¥Ü:

Dim tmp As String
Dim inx As Integer
Dim inf_sr As StreamReader = New StreamReader(inf)
        Do While inf_sr.Peek() >= 0
            inx += 1
            tmp = inf_sr.ReadLine()
        Loop
inf_sr.Close()


§Ú­nª¾¹D inx ªº­È,¦U¦ì¤j¤j¦³没¦³¤Hª¾¹D§ó¶i¨Bªº¤èªk?
V98

ÁÂÁ¦³¥Î,¤]Åý§Ú§ä¨ì¤F¤@­ÓCrystal Report ªº½×¾Â.
V98

TOP

¥»©«³Ì«á¥Ñ ·t¶Â ©ó 2011-1-6 17:10 ½s¿è

datatable  ¬O¸ê®Æªí...  »¡¬ï¤F  ¤]¬O¤@­Ó°}¦C
dtattable  ªº¦n³B¬O  ¦³«Ü¦hªº«ü¥O...  ¯ÊÂI..¦û°O»õÊ^¸û¤j  , ¥B  txt  ¸ê®Æ¨Ã«D¬O ¼Ð·Ç¸ê®Æ®w®æ¦¡¡A»ÝÂà¸ê®Æ

txt ÀÉ®×Âন datatable ¤è¦¡¦p¤U
¥H¤U¬O¤Í¯¸´£¨Ñªº¸ê®Æ¤ù¬q
  1. Dim ansFile As FileInfo
  2.             For Each ansFile In New DirectoryInfo(answerPath).GetFiles("*.txt")
  3.                 Dim dr As DataRow = dtAnswer.NewRow
  4.                 dr("no") = ansFile.Name
  5.                 dr("ans") = ReadCount(ansFile.FullName)
  6.                 dtAnswer.Rows.Add(dr)
  7.             Next
  8.              
  9.             '¾Ç¥Í¦¨ÁZ
  10.             Dim dt As DataTable = New DataTable
  11.             dt.Columns.Add(New DataColumn("no", Type.GetType("System.String")))   '¾Ç¸¹         
  12.             dt.Columns.Add(New DataColumn("right", Type.GetType("System.Int32"))) 'µª¹ï
  13.             dt.Columns.Add(New DataColumn("wrong", Type.GetType("System.Int32"))) 'µª¿ù
  14.             dt.Columns.Add(New DataColumn("score", Type.GetType("System.Int32"))) '±o¤À
½Æ»s¥N½X
http://www.blueshop.com.tw/board/FUM20050124191756KKC/BRD200612150034214VL.html
¬O¾Çµ{¦¡¦Ó¤£¬O­nµ{¦¡¡A¬O¶i¨Bªº°ò¦

TOP

¥»©«³Ì«á¥Ñ linshin1999 ©ó 2011-1-6 16:44 ½s¿è

¥i¬Oªº­ì©l¸ê®Æ¬O".txt"ÀÉ,¥Ø«eÁÙ¤£ª¾¹D¦pÂà´«¦¨datatable, ©Ò¥H´Nª½±µ©ñ¶i°}¦C¨Ó³B²z, ·t¶Â¥S¦p§Aª¾¹D¥i±Ð§Ú©I,·|«Ü·PÁ§A?
V98

TOP

¨º§A³]©w¤@­Ó datatable §a
¬O¾Çµ{¦¡¦Ó¤£¬O­nµ{¦¡¡A¬O¶i¨Bªº°ò¦

TOP

·t¶Â¥S:³o¼Ë¬O¿z¿ï¤£¬Oª½±µÅª¨ú,¥i¯àªº¤è¦¡¬O,±NÀɮשñ¶i°}¤¤©yª½±µ¯Á¤Þ«ü©w,¤Ï¥¿²{¦bªº°O¾ÐÅé³£«Ü¤j.
V98

TOP

¥ô¤@µ§³á..
dim  XoX as long = 99    '¥ô¤@µ§

SELECT CASE IA
        CASE  XoX
           Dim ¤é´Á As String = Mid(Data, 1, 8)
           Dim ®É¶¡ As String = Mid(Data, 9, 6)
        CASE ELSE
            Dim ¤é´Á As String = Mid(Data, 1, 8)
            Dim ®É¶¡ As String = Mid(Data, 9, 6)
     END SELECT
¬O¾Çµ{¦¡¦Ó¤£¬O­nµ{¦¡¡A¬O¶i¨Bªº°ò¦

TOP

·t¶Â¤j¤j,³o¹Lµ{·|¤@µ§¤@µ§ªºÅª,¦pªG§ÚªºÀɮצ³1000µ§,µM«á­nÀH¾÷Ū¨ú1000µ§¤ºªº¥ô¤@µ§¸ê®Æ,­n¦p¦ó¼g?
V98

TOP

Dim TextStr As New System.IO.StreamReader(FileTxt, System.Text.Encoding.Default)
Dim Ia As Long = 0
   Do While TextStr.Peek > -1
     Dim Data As String = TextStr.ReadLine
     Ia +=1
     SELECT CASE IA
        CASE  1
           Dim ¤é´Á As String = Mid(Data, 1, 8)
           Dim ®É¶¡ As String = Mid(Data, 9, 6)
        CASE ELSE
            Dim ¤é´Á As String = Mid(Data, 1, 8)
            Dim ®É¶¡ As String = Mid(Data, 9, 6)
     END SELECT
   Loop

§Úªº¥Îªk ...  §A°Ñ¦Ò¬Ý¬Ý..
¬O¾Çµ{¦¡¦Ó¤£¬O­nµ{¦¡¡A¬O¶i¨Bªº°ò¦

TOP

¨º´N¬O³o¼Ë¤l¤F,·t¶Â¤j¤j¦b VB ªº¯Á¤ÞÀɦp¦ó¾Þ§@? ¥H«e§Ú¬O³o¼Ë¼gªº:

OPEN FILENAME FOR RANDOM AS #8 LEN = 15


CLOSE #8
V98

TOP

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD