Skip to content

Instantly share code, notes, and snippets.

@AuroraNorthernQuarter
Created July 8, 2020 01: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/8e8edeb7fdf3a12b0e15c071432a2a87 to your computer and use it in GitHub Desktop.
Save AuroraNorthernQuarter/8e8edeb7fdf3a12b0e15c071432a2a87 to your computer and use it in GitHub Desktop.
private function Touroku(byval iSta as integer,byval iNsta as integer) as boolean
const animal_num as string = "Touroku"
dim tSQL as string
dim kazu as string
dim lNum as long
dim kansu1sql as string
on error GoTo err_proc
Touroku = false
kazu = iif(isnull(dmax("通番","リアルタイム情報")),1,dmax("通番","リアルタイム情報")+1)
kansu1sql = kansu1(data1,data2,"データ入力",data_online)
if isnull(dmax("並び順","リアルタイム情報",kansu1sql) Then
lNum = 1
else
lNum = dmax("並び順","リアルタイム情報",kansu1sql) + 1
end if
tSQL = ""
tSQL = "insert into リアルタイム情報 values(" & kazu
tSQL = tSQL & "," & format(me.txtdate.value,"yyyymmdd")
tSQL = tSQL & "," & data2 & "," & data_online
tSQL = tSQL & "," & iSta & "," & iNsta & "," & data3
tSQL = tSQL & "," & minimum & "," & minimum & "," & lNum
tSQL = tSQL & "," & format(now,"yyyymmdd") & "," & format(now,"hhmmss")
tSQL = tSQL & "," & minimum & ")"
dbinfo.execute tSQL
Touroku = true
exit function
err_proc:
call showmsg(aquarium_num,animal_num,err.description)
end function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment