Skip to content

Instantly share code, notes, and snippets.

@AuroraNorthernQuarter
Created June 30, 2020 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AuroraNorthernQuarter/2ff16e49a84763b839c43edc4795e0b4 to your computer and use it in GitHub Desktop.
Save AuroraNorthernQuarter/2ff16e49a84763b839c43edc4795e0b4 to your computer and use it in GitHub Desktop.
dim aquarium as dao.Recordset
dim loopcount as long
dim ICnt   as long
dim vSt   as variant
Public dbinfo as database
Public const KUBUN as integer = 1
lloopcount = 0
ICnt = 0
Do While Not EOF(1)
Line Input #1,vSt
tSQL = ""
tSQL = "select max(並び順) from リアルタイム情報"
tSQL = tSQL & "where 集計日 = " & format(me.txtdate.value,"yyyymmdd")
tSQL = tSQL & "and 集計区分 = " & KUBUN
set aquarium = dbinfo.OpenRecordset(tSQL,dbOpenDynaset)
If aquarium.EOF Or IsNull(aquarium.Fields(0).Value) Then
lNum = 1
Else
lNum = aquarium.Fields(0).Value + 1
End If
Set aquarium = Nothing
tSQL = ""
tSQL = "select max(番号) from リアルタイム情報"
set aquarium = dbinfo.OpenRecordset(tSQL,dbOpenDynaset)
If aquarium.EOF or IsNull(aquarium.fields(0).value) then
kazu = 1
Else
kazu = aquarium.fields(0).value + 1
End If
set aquarium = Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment