% ' ' ' %> <% main() Sub main() Dim Query Dim Content Dim GroupCD GroupCD = Request("GroupCD") Dim Action Action = Request("Action") Dim RouteType RouteType = Request("RouteType") Dim Url Url = Request.ServerVariables("URL") Dim db Set db = InitQuery() Dim ii Dim iii Dim jj jj = 0 Dim UserID() ReDim UserID(0) Dim PreShukeiBunrui1 Dim PreShukeiBunrui2 Dim PreShukeiBunrui3 PreShukeiBunrui1 = "" PreShukeiBunrui2 = "" PreShukeiBunrui3 = "" Dim SendValue, TmpValue1, TmpValue2 SendValue = Request("SendValue") 'スプレッドシート引数 TmpValue1 = split(SendValue, ";") '行で分解 Query = " DELETE FROM YTMP_TC5学生M " Set Content = OpenQuery(Query) '行追加モード If UCase(Left(Action, 6)) = "TMPADD" Then For ii = 0 To UBound(TmpValue1) - 1 TmpValue2 = split(TmpValue1(ii), ",") '列で分解 '今までのユーザーID配列で比較 Dim bCheck bCheck = 0 For iii = 0 To UBound(UserID) -1 If TmpValue2(0) = UserID(iii) Then bCheck = 1 Exit For End If Next If bCheck < 1 Then '半角カンマ・セミコロンを代替文字から元に戻す処理 For iii = 0 To UBound(TmpValue2) - 1 TmpValue2(iii) = Replace(TmpValue2(iii), "CommammoC", ",") TmpValue2(iii) = Replace(TmpValue2(iii), "SemicolonolocimeS", ";") Next Query = "exec SPMユーザー一括挿入 '" & GB_SystemCD & "'," Query = Query & " '" & TmpValue2(0) & "'" Query = Query & ",'" & TmpValue2(1) & "'" Query = Query & ",'" & TmpValue2(2) & "'" Query = Query & ",'" & TmpValue2(3) & "'" If GroupCD = "" Then Query = Query & ",'" & ConvRevGroupMeisyo(TmpValue2(4)) & "'" Else Query = Query & ",'" & GroupCD & "'" End If Set Content = ExecQuery(db, Query) jj = jj + 1 ReDim Preserve UserID(jj) UserID(jj) = TmpValue2(0) End If Next End If '一括更新モード If Action = "TmpAddEnd" Then Query = "exec SPMユーザー一括更新 '" & GB_SystemCD & "'," Query = Query & " '" & GroupCD & "%'" Set Content = ExecQuery(db, Query) Response.Redirect(Replace(Url, "_bin", "") & "?GroupCD=" & GroupCD) End If %> <% = HtmlHeader("") %>