server| Script <%
Set conn = Server.CreateObject ("ADODB. Connection ")
Conn.Open "ODBC name", "username", "password"
Sql1= "SELECT * from dbo.sysobjects where type is not in (' S ', ' D ', ' K ')"
Sql1= "SELECT * from dbo.sysobjects where type = ' U '"
Set RSCC = Server.CreateObject ("Adodb.recordset")
Set rs = Server.CreateObject ("Adodb.recordset")
Rscc.open sql1,conn,1,2
Do as not rscc.eof
sql = "SELECT * from" &RSCC ("name")
Rs.Open sql,conn,1,2
Response.Write " Table name "&RSCC" ("Name") & "
"
If "1" = "1" Then
For i=0 to Rs. Fields.count-1
Response.Write "Field Name:" &rs.fields (i). Name &
"
Response.Write "Type:"
If Rs.fields (i) type= "3" Then
Response.Write "Int"
If Rs.fields (i). Attributes= "Then" Response.Write "AutoNumber field"
If Rs.fields (i). Attributes= "Then" Response.Write "Allow null"
If Rs.fields (i). Attributes= "then" Response.Write "Not allowed empty"
ElseIf Rs.fields (i) type= "129" Then
Response.Write "Char"
Response.Write "Size" &rs.fields (i). DefinedSize
If Rs.fields (i). Attributes= "Then" Response.Write "Allow null"
If Rs.fields (i). Attributes= "then" Response.Write "Not allowed empty"
ElseIf Rs.fields (i) type= "201" Then
Response.Write "Text"
If Rs.fields (i). attributes= "234" then Response.Write "Allow null"
If Rs.fields (i). attributes= "138" Then Response.Write "do not allow Nulls"
ElseIf Rs.fields (i) type= "then"
Response.Write "nvarchar"
Response.Write "Size" &rs.fields (i). DefinedSize
If Rs.fields (i). Attributes= "8" Then Response.Write "! Do not allow null "
If Rs.fields (i). Attributes= "Then Response.Write"! Allow null "
ElseIf Rs.fields (i) type= "131" then
Response.Write "Numeric"
If Rs.fields (i). Attributes= "Then" Response.Write "Allow null"
If Rs.fields (i). Attributes= "then" Response.Write "Not allowed empty"
ElseIf Rs.fields (i) type= "2" Then
Response.Write "smallint"
If Rs.fields (i). Attributes= "Then Response.Write"! Allow null "
If Rs.fields (i). Attributes= "Then Response.Write"! Do not allow null "
ElseIf Rs.fields (i) type= "one" then
Response.Write "Bit"
If Rs.fields (i). Attributes= "Then Response.Write"! Allow null "
If Rs.fields (i). Attributes= "Then Response.Write"! Do not allow null "
ElseIf Rs.fields (i) type= "135" Then
Response.Write "SmallDateTime"
If Rs.fields (i). Attributes= "Then Response.Write"! Allow null "
If Rs.fields (i). Attributes= "Then Response.Write"! Do not allow null "
ElseIf Rs.fields (i) type= "203" Then
Response.Write "ntext"
If Rs.fields (i). attributes= "234" Then Response.Write "! Allow null "
If Rs.fields (i). attributes= "138" Then Response.Write "! Do not allow null "
ElseIf Rs.fields (i) type= "6" Then
Response.Write "Money"
If Rs.fields (i). Attributes= "Then Response.Write"! Allow null "
If Rs.fields (i). Attributes= "Then Response.Write"! Do not allow null "
ElseIf Rs.fields (i) type= "130" Then
Response.Write "NCHAR"
If Rs.fields (i). Attributes= "Then Response.Write"! Allow null "
If Rs.fields (i). Attributes= "Then Response.Write"! Do not allow null "
ElseIf Rs.fields (i) type= "4" Then
Response.Write "Real"
If Rs.fields (i). Attributes= "Then Response.Write"! Allow null "
If Rs.fields (i). Attributes= "Then Response.Write"! Do not allow null "
ElseIf Rs.fields (i) type= "5" Then
Response.Write "Flat"
If Rs.fields (i). Attributes= "Then Response.Write"! Allow null "
If Rs.fields (i). Attributes= "Then Response.Write"! Do not allow null "
ElseIf Rs.fields (i) type= "128" Then
Response.Write "Binary"
If Rs.fields (i). Attributes= "Then Response.Write"! Allow null "
If Rs.fields (i). Attributes= "Then Response.Write"! Do not allow null "
Else
Response.Write "Unknown" &rs.fields (i). Type
End If
Response.Write "Properties:" &rs.fields (i). Attributes
Response.Write "-------------
"
Next
End If
Rs.close
'-------------------------------------
RSCC. MoveNext
Loop
Set rs=nothing
Set rscc=nothing
Set conn=nothing
%><%
Set conn = Server.CreateObject ("ADODB. Connection ")
Conn.Open "ODBC name", "username", "password"
Sql1= "SELECT * from dbo.sysobjects where type is not in (' S ', ' D ', ' K ')"
Sql1= "SELECT * from dbo.sysobjects where type = ' U '"
Set RSCC = Server.CreateObject ("Adodb.recordset")
Set rs = Server.CreateObject ("Adodb.recordset")
Rscc.open sql1,conn,1,2