<%
Set Conn=Server.Createobject("ADODB.Connection")
Conn.Open "Driver={SQL Server};Server=10.40.1.18;Database=web_User;UID=sa;PWD=sa;"
Set RS_Division =Server.CreateObject("ADODB.Recordset")
sql_Division="select * from Division order by division_name"
rs_Division.open sql_Division,conn,1,3
Dim RowAll , DataRow
DataRow = Rs_division.recordcount
IF DataRow > 5 Then
IF (DataRow Mod 5) > 0 Then
decimalRow = 1
Else
decimalRow = 0
End if
RowAll = CINT((DataRow / 5) + decimalRow)
Elseif DataRow >= 1 Then
RowAll = 1
Else
RowAll = 0
End if
RowAll = Cint(RowAll)
Response.write Typename(RowAll)
Dim arrDivision(RowAll,4) ' Error ในบรรทัดนี้
A = 0
B = 0
Do While not RS_Division.EOF
arrDivision(a,b) = RS_Division("Division_name")
B = B + 1
if b >= 5 Then
B = 0
A = A + 1
End if
Loop
Tag : ASP, JavaScript, VBScript, Web (ASP.NET), WebService