਍ഀ ਍ഀ View ASP Source code਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ
ASP Source Code਍ഀ

ASP File: ਍ഀ jscript/ado/webaccess/designtb.asp

਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ ਍ഀ
      ਍ഀ  ASP Script
      ਍ഀ  Comments or Client-side ਍ഀ Script
        HTML and Text ਍ഀ
਍ഀ
਍ഀ <%@ ਍ഀ Language=JScript ਍ഀ %>
<HTML>
<HEAD>
</HEAD>
<BODY ਍ഀ bgcolor=Lavender>
<%
if ਍ഀ (Request.Form("ticker").count > 0) {
      tbName ਍ഀ = Request.Form("ticker");
} else {
      tbName = ਍ഀ Request.QueryString("ticker");
}

if (Request.Form("SQLsentence").Count ਍ഀ > 0) {
      Session("webConn").Execute( ਍ഀ Request.Form("SQLsentence") );
}

arr4 = new Array(null, null, tbName, ਍ഀ null);
REC = Session("webConn").OpenSchema(20, arr4);
schem = ਍ഀ REC.fields.item(0).value;
cotag = ਍ഀ REC.fields.item(1).value;
REC.Close();

RS = ਍ഀ Session("webConn").Execute( "SELECT * FROM " + tbName );
fdCnt = ਍ഀ RS.Fields.Count;
nameArr = new Array(fdCnt - 1);

function ਍ഀ TypeStr(fdType) {
      switch (fdType) ਍ഀ {
           case 0: ਍ഀ //adEmpty
                ਍ഀ typeStr = ਍ഀ "adEmpty";
                ਍ഀ break;
           case 16: ਍ഀ //adTinyInt
                ਍ഀ typeStr = ਍ഀ "adTinyInt";
                ਍ഀ break;
           case 2: ਍ഀ //adSmallInt
                ਍ഀ typeStr = ਍ഀ "adSmallInt";
                ਍ഀ break;
           case 3: ਍ഀ //adInteger
                ਍ഀ typeStr = ਍ഀ "adInteger";
                ਍ഀ break;
           case 20: ਍ഀ //adBigInt
                ਍ഀ typeStr = ਍ഀ "adBigInt";
                ਍ഀ break;
           case 17: ਍ഀ //adUnsignedTinyInt
                ਍ഀ typeStr = ਍ഀ "adUnsignedTinyInt";
                ਍ഀ break;
           case 18: ਍ഀ //adUnsignedSmallInt
                ਍ഀ typeStr = ਍ഀ "adUnsignedSmallInt";
                ਍ഀ break;
           case 19: ਍ഀ //adUnsignedInt
                ਍ഀ typeStr = ਍ഀ "adUnsignedInt";
                ਍ഀ break;
           case 21: ਍ഀ //adUnsignedBigInt
                ਍ഀ typeStr = ਍ഀ "adUnsignedBigInt";
                ਍ഀ break;
           case 4: ਍ഀ //adSingle
                ਍ഀ typeStr = ਍ഀ "adSingle";
                ਍ഀ break;
           case 5: ਍ഀ //adDouble
                ਍ഀ typeStr = ਍ഀ "adDouble";
                ਍ഀ break;
           case 6: ਍ഀ //dCurrency
                ਍ഀ typeStr = ਍ഀ "adCurrency";
                ਍ഀ break;
           case 14: ਍ഀ //adDecimal
                ਍ഀ typeStr = ਍ഀ "adDecimal";
                ਍ഀ break;
           case 131: ਍ഀ //adNumeric
                ਍ഀ typeStr = ਍ഀ "adNumeric";
                ਍ഀ break;
           case 11: ਍ഀ //adBoolean
                ਍ഀ typeStr = ਍ഀ "adBoolean";
                ਍ഀ break;
           case 10: ਍ഀ //adError
                ਍ഀ typeStr = ਍ഀ "adError";
                ਍ഀ break;
           case 132: ਍ഀ //adUserDefined
                ਍ഀ typeStr = ਍ഀ "adUserDefined";
                ਍ഀ break;
           case 12: ਍ഀ //adVariant ਍ഀ
                ਍ഀ typeStr = ਍ഀ "adVariant";
                ਍ഀ break;
           case 9: ਍ഀ //adIDispatch ਍ഀ
                ਍ഀ typeStr = ਍ഀ "adIDispatch";
                ਍ഀ break;
           case 13: ਍ഀ //adIUnknown
                ਍ഀ typeStr = ਍ഀ "adIUnknown";
                ਍ഀ break;
           case 72: ਍ഀ //adGUID
                ਍ഀ typeStr = ਍ഀ "adGUID";
                ਍ഀ break;
           case 7: ਍ഀ //adDate
                ਍ഀ typeStr = ਍ഀ "adDate";
                ਍ഀ break;
           case 133: ਍ഀ //adDBDate
                ਍ഀ typeStr = ਍ഀ "adDBDate";
                ਍ഀ break;
           case 134: ਍ഀ //adDBTime
                ਍ഀ typeStr = ਍ഀ "adDBTime";
                ਍ഀ break;
           case 135: ਍ഀ //adDBTimeStamp
                ਍ഀ typeStr = ਍ഀ "adDBTimeStamp";
                ਍ഀ break;
           case 8: ਍ഀ //adBSTR ਍ഀ
                ਍ഀ typeStr = ਍ഀ "adBSTR";
                ਍ഀ break;
           case 129: ਍ഀ //adChar
                ਍ഀ typeStr = ਍ഀ "adChar";
                ਍ഀ break;
           case 200: ਍ഀ //adVarChar
                ਍ഀ typeStr = ਍ഀ "adVarChar";
                ਍ഀ break;
           case 201: ਍ഀ //adLongVarChar
                ਍ഀ typeStr = ਍ഀ "adLongVarChar";
                ਍ഀ break;
           case 130: ਍ഀ //adWChar
                ਍ഀ typeStr = ਍ഀ "adWChar";
                ਍ഀ break;
           case 202: ਍ഀ //adVarWChar
                ਍ഀ typeStr = ਍ഀ "adVarWChar";
                ਍ഀ break;
           case 203: ਍ഀ //adLongVarWChar
                ਍ഀ typeStr = ਍ഀ "adLongVarWChar";
                ਍ഀ break;
           case 128: ਍ഀ //adBinary
                ਍ഀ typeStr = ਍ഀ "adBinary";
                ਍ഀ break;
           case 204: ਍ഀ //adVarBinary
                ਍ഀ typeStr = ਍ഀ "adVarBinary";
                ਍ഀ break;
           case 205: ਍ഀ //adLongVarBinary ਍ഀ
                ਍ഀ typeStr = ਍ഀ "adLongVarBinary";
                ਍ഀ break;
           ਍ഀ default:
                ਍ഀ typeStr = "adTypeUnknown";
      ਍ഀ }
      return typeStr;
}
dbms = ਍ഀ Request.QueryString("dbms");
%>

<FORM method=POST ਍ഀ action="designtb.asp?dbms=<%=dbms%>&ticker=<%=tbName%>" name="form1">
<TABLE border=0 ਍ഀ cellspacing=0 cellpadding=0>
     <TR><TD ਍ഀ valign=top>
           ਍ഀ <TABLE><TR><TD><b>Table Name: [ </b><%=tbName%><b> ਍ഀ ]</b></TD></TR></TABLE>

           ਍ഀ <TABLE><TR>
                ਍ഀ <TD><font ਍ഀ size=1><b>Name:</b></font><BR><INPUT type=textbox ਍ഀ name=fdName ਍ഀ value=""></TD>
                ਍ഀ <TD><font ਍ഀ size=1><b>Type:</b></font><BR><SELECT name=fdType ਍ഀ width=150 style="WIDTH: 150" ਍ഀ onchange="ChgType()">
                     ਍ഀ <OPTION ਍ഀ value=0>adEmpty
                     ਍ഀ <OPTION ਍ഀ value=1>adTinyInt
                     ਍ഀ <OPTION ਍ഀ value=2>adSmallInt
                     ਍ഀ <OPTION ਍ഀ value=3>adInteger
                     ਍ഀ <OPTION ਍ഀ value=4>adBigInt
                     ਍ഀ <OPTION ਍ഀ value=5>adUnsignedTinyInt
                     ਍ഀ <OPTION ਍ഀ value=6>adUnsignedSmallInt
                     ਍ഀ <OPTION ਍ഀ value=7>adUnsignedInt
                     ਍ഀ <OPTION ਍ഀ value=8>adUnsignedBigInt
                     ਍ഀ <OPTION ਍ഀ value=9>adSingle
                     ਍ഀ <OPTION ਍ഀ value=10>adDouble
                     ਍ഀ <OPTION ਍ഀ value=11>adCurrency
                     ਍ഀ <OPTION ਍ഀ value=12>adDecimal
                     ਍ഀ <OPTION ਍ഀ value=13>adNumeric
                     ਍ഀ <OPTION ਍ഀ value=14>adBoolean
                     ਍ഀ <OPTION ਍ഀ value=15>adError
                     ਍ഀ <OPTION ਍ഀ value=16>adUserDefined
                     ਍ഀ <OPTION value=17>adVariant ਍ഀ
                     ਍ഀ <OPTION value=18>adIDispatch ਍ഀ
                     ਍ഀ <OPTION value=19>adIUnknown ਍ഀ
                     ਍ഀ <OPTION ਍ഀ value=20>adGUID
                     ਍ഀ <OPTION value=21>adDate ਍ഀ
                     ਍ഀ <OPTION value=22>adDBDate ਍ഀ
                     ਍ഀ <OPTION ਍ഀ value=23>adDBTime
                     ਍ഀ <OPTION value=24>adDBTimeStamp ਍ഀ
                     ਍ഀ <OPTION value=25>adBSTR ਍ഀ
                     ਍ഀ <OPTION value=26>adChar ਍ഀ
                     ਍ഀ <OPTION value=27 ਍ഀ selected>adVarChar
                     ਍ഀ <OPTION ਍ഀ value=28>adLongVarChar
                     ਍ഀ <OPTION ਍ഀ value=29>adWChar
                     ਍ഀ <OPTION ਍ഀ value=30>adVarWChar
                     ਍ഀ <OPTION ਍ഀ value=31>adLongVarWChar
                     ਍ഀ <OPTION ਍ഀ value=32>adBinary
                     ਍ഀ <OPTION ਍ഀ value=33>adVarBinary
                     ਍ഀ <OPTION value=34>adLongVarBinary ਍ഀ
                     ਍ഀ </SELECT></TD>
                ਍ഀ <TD><font size=1><b>Size</b> or ਍ഀ [<b>Precision</b>,<b>scale</b>]<b>:</b></font><BR>
                     ਍ഀ <INPUT type=textbox name=fdSize value=50 ਍ഀ size=16></TD>
           ਍ഀ </TR></TABLE>

           ਍ഀ <TABLE><TR>
                ਍ഀ <TD><INPUT name=addField type=button value=" Add Field " ਍ഀ onClick="addField_onClick();"></TD>
                ਍ഀ <TD><INPUT name=ridField type=button value="Remove Field" ਍ഀ onClick="ridField_onClick();"></TD>
           ਍ഀ </TR></TABLE>

           ਍ഀ <TABLE><TR>
                ਍ഀ <TD><SELECT name=listName size=11 WIDTH=150 style="WIDTH: 150" ਍ഀ onChange="listName_onChange();">
<%                     ਍ഀ for (i = 0; i <  fdCnt; i++) ਍ഀ {
                          ਍ഀ nameArr[i] = ਍ഀ RS.Fields(i).Name%>

                          ਍ഀ <OPTION><%=nameArr[i]%></OPTION>
<%                     ਍ഀ }%>
                     ਍ഀ </SELECT></TD>
                ਍ഀ <TD><SELECT name=listType size=11 WIDTH=150 style="WIDTH: 150" ਍ഀ onChange="listType_onChange();">
<%                     ਍ഀ for (i = 0; i <  fdCnt; i++) ਍ഀ {%>
                          ਍ഀ <OPTION><%=TypeStr( RS.Fields(i).Type ਍ഀ )%></OPTION>
<%                     ਍ഀ }%>
                     ਍ഀ </SELECT></TD>
                ਍ഀ <TD><SELECT name=listSize size=11 WIDTH=130 style="WIDTH: 130" ਍ഀ onChange="listSize_onChange();">
<%                     ਍ഀ for (i = 0; i <  fdCnt; i++) ਍ഀ {%>
                          ਍ഀ <OPTION><%=RS.Fields(i).DefinedSize%></OPTION>
<%                     ਍ഀ }%>
                     ਍ഀ </SELECT></TD>
                ਍ഀ <TD ਍ഀ width=10> </TD>
           ਍ഀ </TR></TABLE>
     ਍ഀ </TD>
     ਍ഀ <TD>
           ਍ഀ <TABLE>
                ਍ഀ <TR><TD><font ਍ഀ size=1><B>Indexes:</B></font><BR>
                     ਍ഀ <SELECT name=listIndex size=4 width=180 style="WIDTH: 180">
<%                     ਍ഀ RS.Close();
                     ਍ഀ arr5 = new Array(schem, cotag, null, null, ਍ഀ tbName);
                     ਍ഀ REC = Session("webConn").OpenSchema(12, ਍ഀ arr5);
                     ਍ഀ temp = ਍ഀ "";
                     ਍ഀ while ( !REC.Eof ) ਍ഀ {
                          ਍ഀ idxName = ਍ഀ REC.Fields("INDEX_NAME");
                          ਍ഀ if ( idxName.Value != null && temp != idxName.Value ) ਍ഀ {%>

                               ਍ഀ <OPTION><%=idxName.Value%>
<%                               ਍ഀ temp = ਍ഀ idxName.Value;
                          ਍ഀ }
                          ਍ഀ REC.MoveNext();
                     ਍ഀ }
                     ਍ഀ REC.Close();%>

                     ਍ഀ </SELECT><BR>
                ਍ഀ <INPUT name=addIndex type=button value="Add Index" ਍ഀ onClick="addIndex_onClick();">
                ਍ഀ <INPUT name=ridIndex type=button value="Del Index" ਍ഀ onClick="ridIndex_onClick();">
                ਍ഀ </TD></TR>

                ਍ഀ <TR><TD><font size=1><B>Index ਍ഀ Name:</B></font><BR>
                     ਍ഀ <INPUT name=idxName size=16 ਍ഀ value=""> 
                     ਍ഀ <INPUT name=unique type=textbox size=1 ਍ഀ value=""> Unique (<B>y</B>/<B>n</B>)</TD>
                ਍ഀ </TR>

                ਍ഀ <TR><TD><font size=1><B>Available ਍ഀ Fields:</B></font><BR>
                     ਍ഀ <SELECT name=listFields size=4 width=180 style="WIDTH: 180" ਍ഀ onChange="listFields_onChange();">
<%                     ਍ഀ for (i = 0; i <  fdCnt; i++) ਍ഀ {%>
                          ਍ഀ <OPTION><%=nameArr[i]%></OPTION>
<%                     ਍ഀ }%>
                     ਍ഀ </SELECT>
                ਍ഀ </TD></TR>

                ਍ഀ <TR><TD><font size=1><B>Indexed ਍ഀ fields:</B><font><BR>
                     ਍ഀ <INPUT type=textbox name=idxFields size=23 ਍ഀ value="">
                ਍ഀ </TD></TR>
           ਍ഀ </TABLE>
     ਍ഀ </TD></TR></TABLE>
      <input ਍ഀ name="SQLsentence" type=hidden ਍ഀ size=4>
</FORM>
</BODY>
</HTML>

<SCRIPT  language=JavaScript>
var dbms = "<%=dbms%>";

function ਍ഀ ChgType(){
      typeVal = ਍ഀ parseInt(document.form1.fdType.selectedIndex);
      ਍ഀ switch ( typeVal ) {
      case ਍ഀ 12:
      case ਍ഀ 13:
           ਍ഀ document.form1.fdSize.value = "18, ਍ഀ 0";
           ਍ഀ break;
      case ਍ഀ 26:
      case 29:
      ਍ഀ case 32:
           ਍ഀ document.form1.fdSize.value = ਍ഀ "10";
           ਍ഀ break;
      case ਍ഀ 27:
      case 20:
      ਍ഀ case 33:
           ਍ഀ document.form1.fdSize.value = ਍ഀ "50";
           ਍ഀ break;
      ਍ഀ default:
           ਍ഀ document.form1.fdSize.value = "";
      ਍ഀ }
}

function addField_onClick(){
      var ਍ഀ name = document.form1.fdName.value;
      if ਍ഀ (name.length <  ਍ഀ 1){
           alert("Field ਍ഀ name is ਍ഀ required.");
           ਍ഀ return;
      }
      ch ਍ഀ = name.charAt(0);
      if (ch <  'A' || (ch ਍ഀ > 'Z' && ch <  'a') || ch > 'z') ਍ഀ {
           alert("Invalid ਍ഀ field name.");
           ਍ഀ return;
      }
      ਍ഀ for (i = 0; i <  name.length; i++) {
      ਍ഀ ch = ਍ഀ name.charAt(i);
           ਍ഀ if ( (ch <  '0' || (ch > '9' && ch <  'A') || (ch ਍ഀ > 'Z' && ch <  'a') || ch > 'z') && ch != '_' ਍ഀ ){
      alert("Invalid field ਍ഀ name.");
      ਍ഀ return;
      }
      ਍ഀ }
      if (document.form1.fdType.selectedIndex == ਍ഀ 0) {
           ਍ഀ alert("Please select a field ਍ഀ type.");
           ਍ഀ return;
      }
      if ਍ഀ ( (document.form1.fdType.selectedIndex == 25 || ਍ഀ document.form1.fdType.selectedIndex == 26 || ਍ഀ
           ਍ഀ document.form1.fdType.selectedIndex == 27 || document.form1.fdType.selectedIndex ਍ഀ == 29 ||
      document.form1.fdType.selectedIndex ਍ഀ == 30 || document.form1.fdType.selectedIndex == 32 || ਍ഀ
      document.form1.fdType.selectedIndex == 33 ) ਍ഀ &&
      ( isNaN( ਍ഀ parseInt(document.form1.fdSize.value) ) || parseInt(document.form1.fdSize.value) ਍ഀ == 0 )
      ) ਍ഀ {
           alert("Field ਍ഀ size is ਍ഀ requested.");
           ਍ഀ return;
      ਍ഀ }

      if ( document.form1.fdType.selectedIndex ਍ഀ == 12 || document.form1.fdType.selectedIndex == 13 ) ਍ഀ {
           if ਍ഀ (document.form1.fdSize.value == "") ਍ഀ {
                ਍ഀ alert("You should enter for Precision and scale, form such as: 18, ਍ഀ 0");
                ਍ഀ return;
           ਍ഀ }
           pos = ਍ഀ document.form1.fdSize.value.indexOf(",");
           ਍ഀ if ( pos == -1 ) ਍ഀ {
                ਍ഀ alert("You should enter for Precision and scale, form such as: 18, ਍ഀ 0");
                ਍ഀ return;
           ਍ഀ }
           if ( isNaN( ਍ഀ parseInt(document.form1.fdSize.value.substring(0, pos)) ) ਍ഀ ||
           ਍ഀ parseInt(document.form1.fdSize.value.substring(0, pos)) == 0 ) ਍ഀ {
                ਍ഀ alert("You should enter for Precision and scale, form such as: 18, ਍ഀ 0");
                ਍ഀ return;
           ਍ഀ }
           if ( isNaN( ਍ഀ parseInt(document.form1.fdSize.value.substring(pos + 1)) ) ਍ഀ ||
           ਍ഀ parseInt(document.form1.fdSize.value.substring(0, pos + 1)) == 0 ) ਍ഀ {
                ਍ഀ alert("You should enter for Precision and scale, form such as: 18, ਍ഀ 0");
                ਍ഀ return;
           ਍ഀ }
      }

      ਍ഀ lstLen = document.form1.listName.length;
      for ਍ഀ (i = 0; i <  lstLen - 1; ਍ഀ i++){
           if ਍ഀ (document.form1.listName.options[i].text == document.form1.fdName.value) ਍ഀ {
                ਍ഀ alert("Field name areadly ਍ഀ exist.");
                ਍ഀ return;
           ਍ഀ }
      }

      str ਍ഀ = AddFieldSQL();

      if (str.indexOf("Error:") ਍ഀ != -1) {
           //var ਍ഀ tmp = str.substring(6, ਍ഀ str.length);
           ਍ഀ //alert("Not support this field type( " + tmp + " ) in the ਍ഀ database.");
           ਍ഀ return;
      ਍ഀ }

      document.form1.SQLsentence.value = ਍ഀ str;
      ਍ഀ document.form1.submit();
}

function ਍ഀ AddFieldSQL(){
      var ਍ഀ sqlsent;
      switch( dbms ) ਍ഀ {
      case ਍ഀ "Access":
      case ਍ഀ "MySQL":
      case ਍ഀ "Oracle":
      case ਍ഀ "SQLServer":
      case ਍ഀ "Sybase":
      case "MiniSQL": ਍ഀ //?
      case "Postgres": ਍ഀ //?
           sqlsent = ਍ഀ "ALTER TABLE <%=tbName%>  ADD ਍ഀ ";
           ਍ഀ break;

      case ਍ഀ "Informix":
           ਍ഀ sqlsent = "ALTER TABLE <%=tbName%>  ADD ਍ഀ (";
           ਍ഀ break;
      }
      ਍ഀ
      fdN = ਍ഀ document.form1.fdName.value;
      fdS = ਍ഀ document.form1.fdSize.value;
      adoType = ਍ഀ document.form1.fdType.options[document.form1.fdType.selectedIndex].text;
      ਍ഀ fdT = fieldDataType(adoType);

      if ਍ഀ (fdT.indexOf("Error:") != -1) ਍ഀ {
           alert("Not ਍ഀ support this field type( " + adoType + " ) in the specified ਍ഀ database.");
           ਍ഀ return "Error:";
      ਍ഀ }
     
     if ( adoType == ਍ഀ "adChar" || adoType == "adVarChar" || adoType == "adWChar" ਍ഀ ||
           adoType == ਍ഀ "adVarWChar" || adoType == "adDecimal" || adoType == "adNumeric" ) ਍ഀ {
         sqlsent = sqlsent + fdN + ਍ഀ " " + fdT + "(" + fdS + ")";

      } else if ( ਍ഀ adoType == "adBinary" || adoType == "adVarBinary" ) ਍ഀ {
           if ( dbms == ਍ഀ "MySQL" ) ਍ഀ {
                ਍ഀ sqlsent = sqlsent + fdN + " " + ਍ഀ fdT;
           } else ਍ഀ {
                ਍ഀ sqlsent = sqlsent + fdN + " " + fdT + "(" + fdS + ਍ഀ ")";
           ਍ഀ }
      } else ਍ഀ {
           sqlsent = ਍ഀ sqlsent + fdN + " " + fdT;
      ਍ഀ }

      if ( dbms == "Informix" ) ਍ഀ {
           sqlsent += ਍ഀ ")";
      } else ਍ഀ {
           sqlsent += " ਍ഀ NULL";
      }

      ਍ഀ return sqlsent;
}
function ਍ഀ ridField_onClick(){
      if ( dbms == "Access" || ਍ഀ dbms == "Cloudscape" || dbms == "Oracle" ਍ഀ ){
           alert("The ਍ഀ database doesn't support this ਍ഀ operater.");
           ਍ഀ return;
      }
      ਍ഀ var selIdx = ਍ഀ document.form1.listName.selectedIndex;
      if ( ਍ഀ selIdx <  document.form1.listName.length && selIdx > -1 ) ਍ഀ {
           ਍ഀ document.form1.SQLsentence.value = ਍ഀ DropFieldSQL();
           ਍ഀ document.form1.submit();
      ਍ഀ }
}

function DropFieldSQL(){
      var ਍ഀ sqlsent = "";
      selIdx = ਍ഀ document.form1.listName.selectedIndex;
      fdN = ਍ഀ document.form1.listName.options[selIdx].text;

      ਍ഀ switch( dbms )
      ਍ഀ {
      case ਍ഀ "Informix":
           ਍ഀ sqlsent = "ALTER TABLE <%=tbName%>  DROP ਍ഀ (" + fdN + ")";
           ਍ഀ break;
      case ਍ഀ "Sybase":
      case ਍ഀ "MySQL":
      case "MiniSQL": ਍ഀ //?
      case "Postgres": ਍ഀ //?
           sqlsent = ਍ഀ "ALTER TABLE <%=tbName%>  DROP " + ਍ഀ fdN;
           ਍ഀ break;
      case ਍ഀ "SQLServer":
           ਍ഀ sqlsent = "ALTER TABLE <%=tbName%>  DROP ਍ഀ COLUMN " + fdN;
           ਍ഀ break;
      }
      ਍ഀ return sqlsent;
}

function ਍ഀ fieldDataType(adoType){
      if (dbms == "Access") ਍ഀ { //1
           switch ( ਍ഀ adoType ) {
           case ਍ഀ "adTinyInt":
                ਍ഀ FdType = ਍ഀ "BYTE";
                ਍ഀ break;
           case ਍ഀ "adSmallInt":
                ਍ഀ FdType = ਍ഀ "SMALLINT";
                ਍ഀ break;
           case ਍ഀ "adInteger":
                ਍ഀ FdType = ਍ഀ "INTEGER";
                ਍ഀ break;
           case ਍ഀ "adUnsignedInt":
                ਍ഀ FdType = ਍ഀ "COUNTER";
                ਍ഀ break;
           case ਍ഀ "adSingle":
                ਍ഀ FdType = ਍ഀ "REAL";
                ਍ഀ break;
           case ਍ഀ "adDouble":
                ਍ഀ FdType = ਍ഀ "DOUBLE";
                ਍ഀ break;
           case ਍ഀ "adCurrency":
                ਍ഀ FdType = ਍ഀ "CURRENCY";
                ਍ഀ break;
           case ਍ഀ "adBoolean":
                ਍ഀ FdType = ਍ഀ "BIT";
                ਍ഀ break;
           case ਍ഀ "adGUID":
                ਍ഀ FdType = ਍ഀ "GUID";
                ਍ഀ break;
           case ਍ഀ "adDBTimeStamp":
                ਍ഀ FdType = ਍ഀ "DATETIME";
                ਍ഀ break;
           case ਍ഀ "adChar":
                ਍ഀ FdType = ਍ഀ "CHAR";
                ਍ഀ break;
           case ਍ഀ "adVarChar":
                ਍ഀ FdType = ਍ഀ "VARCHAR";
                ਍ഀ break;
           case ਍ഀ "adLongVarChar":
                ਍ഀ FdType = ਍ഀ "LONGCHAR";
                ਍ഀ break;
           case ਍ഀ "adBinary":
                ਍ഀ FdType = ਍ഀ "BINARY";
                ਍ഀ break;
           case ਍ഀ "adVarBinary":
                ਍ഀ FdType = ਍ഀ "VARBINARY";
                ਍ഀ break;
           case ਍ഀ "adLongVarBinary":
                ਍ഀ FdType = ਍ഀ "LONGBINARY";
                ਍ഀ break;
           ਍ഀ default:
                ਍ഀ FdType = ਍ഀ "Error:";
           ਍ഀ }

      } else if (dbms == "SQLServer") { ਍ഀ //2
           switch ( ਍ഀ adoType ) {
           case ਍ഀ "adTinyInt":
                ਍ഀ FdType = ਍ഀ "tinyint"
                ਍ഀ break;
           case ਍ഀ "adSmallInt":
                ਍ഀ FdType = ਍ഀ "smallint";
                ਍ഀ break;
           case ਍ഀ "adInteger":
                ਍ഀ FdType = ਍ഀ "int";
                ਍ഀ break;
           case ਍ഀ "adSingle":
                ਍ഀ FdType = ਍ഀ "real";
                ਍ഀ break;
           case ਍ഀ "adDouble":
                ਍ഀ FdType = ਍ഀ "float";
                ਍ഀ break;
           case ਍ഀ "adCurrency":
                ਍ഀ FdType = ਍ഀ "money";
                ਍ഀ break;
           case ਍ഀ "adDecimal":
                ਍ഀ FdType = ਍ഀ "decimal";
                ਍ഀ break;
           case ਍ഀ "adNumeric":
                ਍ഀ FdType = ਍ഀ "numeric";
                ਍ഀ break;
           case ਍ഀ "adBoolean":
                ਍ഀ FdType = ਍ഀ "bit";
                ਍ഀ break;
           case ਍ഀ "adGUID":
                ਍ഀ FdType = ਍ഀ "uniqueidentifier";
                ਍ഀ break;
           case ਍ഀ "adDBTimeStamp":
                ਍ഀ FdType = ਍ഀ "datetime";
                ਍ഀ break;
           case ਍ഀ "adChar":
                ਍ഀ FdType = ਍ഀ "char";
                ਍ഀ break;
           case ਍ഀ "adVarChar":
                ਍ഀ FdType = ਍ഀ "varchar";
                ਍ഀ break;
           case ਍ഀ "adLongVarChar":
                ਍ഀ FdType = ਍ഀ "text"
                ਍ഀ break;
           case ਍ഀ "adWChar":
                ਍ഀ FdType = ਍ഀ "nchar";
                ਍ഀ break;
           case ਍ഀ "adVarWChar":
                ਍ഀ FdType = ਍ഀ "nvarchar";
                ਍ഀ break;
           case ਍ഀ "adLongVarWChar":
                ਍ഀ FdType = ਍ഀ "ntext";
                ਍ഀ break;
           case ਍ഀ "adBinary":
                ਍ഀ FdType = ਍ഀ "binary";
                ਍ഀ break;
           case ਍ഀ "adVarBinary":
                ਍ഀ FdType = ਍ഀ "varbinary";
                ਍ഀ break;
           case ਍ഀ "adLongVarBinary":
                ਍ഀ FdType = ਍ഀ "image";
                ਍ഀ break;
           ਍ഀ default:
                ਍ഀ FdType = ਍ഀ "Error:";
           ਍ഀ }
      } else if ( dbms == "MySQL") { ਍ഀ //3
           switch ( ਍ഀ adoType ) {
           case ਍ഀ "adTinyInt":
                ਍ഀ FdType = ਍ഀ "tinyint"
                ਍ഀ break;
           case ਍ഀ "adSmallInt":
                ਍ഀ FdType = ਍ഀ "smallint";
                ਍ഀ break;
           case ਍ഀ "adInteger":
                ਍ഀ FdType = ਍ഀ "int";
                ਍ഀ break;
      case ਍ഀ "adBigInt":
                ਍ഀ FdType = ਍ഀ "bigint";
                ਍ഀ break;
           case ਍ഀ "adUnsignedTinyInt":
                ਍ഀ FdType = "tinyint ਍ഀ unsigned";
                ਍ഀ break;
           case ਍ഀ "adUnsignedSmallInt":
                ਍ഀ FdType = "smallint ਍ഀ unsigned";
                ਍ഀ break;
           case ਍ഀ "adUnsignedInt":
                ਍ഀ FdType = "int ਍ഀ unsigned";
                ਍ഀ break;
           case ਍ഀ "adUnsignedBigInt":
                ਍ഀ FdType = "bigint ਍ഀ unsigned";
                ਍ഀ break;
           case ਍ഀ "adSingle":
                ਍ഀ FdType = ਍ഀ "float";
                ਍ഀ break;
           case ਍ഀ "adDouble":
                ਍ഀ FdType = ਍ഀ "double";
                ਍ഀ break;
           case ਍ഀ "adDecimal":
                ਍ഀ FdType = ਍ഀ "decimal";
                ਍ഀ break;
           case ਍ഀ "adBoolean":
                ਍ഀ FdType = ਍ഀ "bit";
                ਍ഀ break;
           case ਍ഀ "adDBDate":
                ਍ഀ FdType = ਍ഀ "date";
                ਍ഀ break;
           case ਍ഀ "adDBTime":
                ਍ഀ FdType = ਍ഀ "time";
                ਍ഀ break;
           case ਍ഀ "adDBTimeStamp":
                ਍ഀ FdType = ਍ഀ "datetime";
                ਍ഀ break;
           case ਍ഀ "adChar":
                ਍ഀ FdType = ਍ഀ "char";
                ਍ഀ break;
           case ਍ഀ "adVarChar":
                ਍ഀ FdType = ਍ഀ "varchar";
                ਍ഀ break;
           case ਍ഀ "adLongVarChar":
                ਍ഀ FdType = ਍ഀ "text";
                ਍ഀ break;
           case ਍ഀ "adBinary":
                ਍ഀ FdType = ਍ഀ "tinyblob";
                ਍ഀ break;
           case ਍ഀ "adVarBinary":
                ਍ഀ FdType = ਍ഀ "mediumblob";
                ਍ഀ break;
           case ਍ഀ "adLongVarBinary":
                ਍ഀ FdType = ਍ഀ "longblob";
                ਍ഀ break;
           ਍ഀ default:
                ਍ഀ FdType = ਍ഀ "Error:";
           ਍ഀ }
      } else if ( dbms == "Oracle" ) { ਍ഀ //4
           switch ( ਍ഀ adoType ) {
           case ਍ഀ "adTinyInt":
                ਍ഀ FdType = ਍ഀ "NUMBER(3,0)"
                ਍ഀ break;
           case ਍ഀ "adSmallInt":
                ਍ഀ FdType = ਍ഀ "SMALLINT";
                ਍ഀ break;
           case ਍ഀ "adInteger":
                ਍ഀ FdType = ਍ഀ "INT";
                ਍ഀ break;
           case ਍ഀ "adBigInt":
                ਍ഀ FdType = ਍ഀ "NUMBER";
                ਍ഀ break;
           case ਍ഀ "adSingle":
                ਍ഀ FdType = ਍ഀ "REAL";
                ਍ഀ break;
           case ਍ഀ "adDouble":
                ਍ഀ FdType = ਍ഀ "FLOAT";
                ਍ഀ break;
           case ਍ഀ "adNumeric":
                ਍ഀ FdType = ਍ഀ "NUMBER";
                ਍ഀ break;
           case ਍ഀ "adBoolean":
                ਍ഀ FdType = ਍ഀ "NUMBER(1,0)";
                ਍ഀ break;
           case ਍ഀ "adDBTimeStamp":
                ਍ഀ FdType = ਍ഀ "DATE";
                ਍ഀ break;
           case ਍ഀ "adChar":
                ਍ഀ FdType = ਍ഀ "CHAR";
                ਍ഀ break;
           case ਍ഀ "adVarChar":
                ਍ഀ FdType = ਍ഀ "VARCHAR2";
                ਍ഀ break
           case ਍ഀ "adLongVarChar":
                ਍ഀ FdType = ਍ഀ "LONG";
                ਍ഀ break;
           case ਍ഀ "adVarBinary":
                ਍ഀ FdType = ਍ഀ "RAW";
                ਍ഀ break;
           case ਍ഀ "adLongVarBinary":
                ਍ഀ FdType = "LONG ਍ഀ RAW";
           ਍ഀ default:
                ਍ഀ FdType = ਍ഀ "Error:";
           ਍ഀ }
      } else if ( dbms == "Sybase" ) { ਍ഀ //5
           switch ( ਍ഀ adoType ) {
           case ਍ഀ "adTinyInt":
                ਍ഀ FdType = ਍ഀ "tinyint"
                ਍ഀ break;
           case ਍ഀ "adSmallInt":
                ਍ഀ FdType = ਍ഀ "smallint";
                ਍ഀ break;
           case ਍ഀ "adInteger":
                ਍ഀ FdType = ਍ഀ "int";
                ਍ഀ break;
           case ਍ഀ "adSingle":
                ਍ഀ FdType = ਍ഀ "real";
                ਍ഀ break;
           case ਍ഀ "adDouble":
                ਍ഀ FdType = ਍ഀ "float";
                ਍ഀ break;
           case ਍ഀ "adCurrency":
                ਍ഀ FdType = ਍ഀ "money";
                ਍ഀ break;
           case ਍ഀ "adDecimal":
                ਍ഀ FdType = ਍ഀ "decimal";
                ਍ഀ break;
           case ਍ഀ "adNumeric":
                ਍ഀ FdType = ਍ഀ "numeric";
                ਍ഀ break;
           case ਍ഀ "adBoolean":
                ਍ഀ FdType = ਍ഀ "bit";
                ਍ഀ break;
           case ਍ഀ "adDBTimeStamp":
                ਍ഀ FdType = ਍ഀ "datetime";
                ਍ഀ break;
           case ਍ഀ "adChar":
                ਍ഀ FdType = ਍ഀ "char";
                ਍ഀ break;
           case ਍ഀ "adVarChar":
                ਍ഀ FdType = ਍ഀ "varchar";
                ਍ഀ break;
           case ਍ഀ "adLongVarChar":
                ਍ഀ FdType = ਍ഀ "text";
                ਍ഀ break;
           case ਍ഀ "adBinary":
                ਍ഀ FdType = ਍ഀ "binary";
                ਍ഀ break;
           case ਍ഀ "adVarBinary":
                ਍ഀ FdType = ਍ഀ "varbinary";
                ਍ഀ break;
           case ਍ഀ "adLongVarBinary":
                ਍ഀ FdType = ਍ഀ "image";
                ਍ഀ break;
           ਍ഀ default:
                ਍ഀ FdType = ਍ഀ "Error:";
           ਍ഀ }
      } else if ( dbms == "Informix" ) { ਍ഀ //6
           switch ( ਍ഀ adoType ) {
           case ਍ഀ "adSmallInt":
                ਍ഀ FdType = ਍ഀ "smallint";
                ਍ഀ break;
           case ਍ഀ "adInteger":
                ਍ഀ FdType = ਍ഀ "integer";
                ਍ഀ break;
           case ਍ഀ "adSingle":
                ਍ഀ FdType = ਍ഀ "smallfloat";
                ਍ഀ break;
           case ਍ഀ "adDouble":
                ਍ഀ FdType = ਍ഀ "float";
                ਍ഀ break;
           //case ਍ഀ "adCurrency":
                ਍ഀ //FdType = ਍ഀ "money";
                ਍ഀ //break;
           case ਍ഀ "adDecimal":
                ਍ഀ FdType = ਍ഀ "decimal";
                ਍ഀ break;
           case ਍ഀ "adNumeric":
                ਍ഀ FdType = ਍ഀ "numeric";
                ਍ഀ break;
           //case ਍ഀ "adBoolean":
           // ਍ഀ FdType = ਍ഀ "numeric(1,0)";
           ਍ഀ // break;
           case ਍ഀ "adDBDate":
                ਍ഀ FdType = ਍ഀ "date";
                ਍ഀ break;
           case ਍ഀ "adDBTimeStamp":
                ਍ഀ FdType = ਍ഀ "datetime";
                ਍ഀ break;
           case ਍ഀ "adChar":
                ਍ഀ FdType = ਍ഀ "char";
                ਍ഀ break;
           case ਍ഀ "adVarChar":
                ਍ഀ FdType = ਍ഀ "varchar";
                ਍ഀ break;
           case ਍ഀ "adWChar":
                ਍ഀ FdType = ਍ഀ "nchar";
                ਍ഀ break;
           case ਍ഀ "adVarWChar":
                ਍ഀ FdType = ਍ഀ "nvarchar";
                ਍ഀ break;
           case ਍ഀ "adLongVarBinary":
                ਍ഀ FdType = "byte";
           ਍ഀ default:
                ਍ഀ FdType = ਍ഀ "Error:";
           ਍ഀ }
      } else if ( dbms == "Cloudscape" ) { ਍ഀ //7
           switch ( ਍ഀ adoType ) {
           case ਍ഀ "adTinyInt":
                ਍ഀ FdType = ਍ഀ "TINYINT"
                ਍ഀ break;
           case ਍ഀ "adSmallInt":
                ਍ഀ FdType = ਍ഀ "SMALLINT";
                ਍ഀ break;
           case ਍ഀ "adInteger":
                ਍ഀ FdType = ਍ഀ "INT";
                ਍ഀ break;
           case ਍ഀ "adBigInt":
                ਍ഀ FdType = ਍ഀ "LONGINT";
                ਍ഀ break;
           case ਍ഀ "adSingle":
                ਍ഀ FdType = ਍ഀ "REAL";
                ਍ഀ break;
           case ਍ഀ "adDouble":
                ਍ഀ FdType = "DOUBLE ਍ഀ PRECISION";
                ਍ഀ break;
           case ਍ഀ "adDecimal":
                ਍ഀ FdType = ਍ഀ "DECIMAL";
                ਍ഀ break;
           case ਍ഀ "adNumeric":
                ਍ഀ FdType = ਍ഀ "NUMERIC";
                ਍ഀ break;
           case ਍ഀ "adBoolean":
                ਍ഀ FdType = ਍ഀ "BOOLEAN";
                ਍ഀ break;
           case ਍ഀ "adDBDate":
                ਍ഀ FdType = ਍ഀ "DATE";
                ਍ഀ break;
           case ਍ഀ "adDBTime":
                ਍ഀ FdType = ਍ഀ "TIME";
                ਍ഀ break;
           case ਍ഀ "adDBTimeStamp":
                ਍ഀ FdType = ਍ഀ "TIMESTAMP";
                ਍ഀ break;
           case ਍ഀ "adChar":
                ਍ഀ FdType = ਍ഀ "CHAR";
                ਍ഀ break;
           case ਍ഀ "adVarChar":
                ਍ഀ FdType = ਍ഀ "VARCHAR";
                ਍ഀ break;
           case ਍ഀ "adLongVarChar":
                ਍ഀ FdType = "LONG ਍ഀ VARCHAR";
                ਍ഀ break;
           case ਍ഀ "adBinary":
                ਍ഀ FdType = ਍ഀ "BIT";
                ਍ഀ break;
           case ਍ഀ "adVarBinary":
                ਍ഀ FdType = "BIT ਍ഀ VARYING";
                ਍ഀ break;
           case ਍ഀ "adLongVarBinary":
                ਍ഀ FdType = "LONG BIT ਍ഀ VARYING";
           ਍ഀ default:
                ਍ഀ FdType = ਍ഀ "Error:";
           ਍ഀ }
      } else if ( dbms == "Postgres" ) { ਍ഀ //8
           switch ( ਍ഀ adoType ) {
           case ਍ഀ "adSmallInt":
                ਍ഀ FdType = ਍ഀ "int2";
                ਍ഀ break;
           case ਍ഀ "adInteger":
                ਍ഀ FdType = ਍ഀ "ing4";
                ਍ഀ break;
           case ਍ഀ "adBigInt":
                ਍ഀ FdType = ਍ഀ "ing8";
                ਍ഀ break;
           case ਍ഀ "adSingle":
                ਍ഀ FdType = ਍ഀ "float4";
                ਍ഀ break;
           case ਍ഀ "adDouble":
                ਍ഀ FdType = ਍ഀ "float8";
                ਍ഀ break;
           case ਍ഀ "adCurrency":
                ਍ഀ FdType = ਍ഀ "money";
                ਍ഀ break;
           case ਍ഀ "adBoolean":
                ਍ഀ FdType = ਍ഀ "bool";
                ਍ഀ break;
           case ਍ഀ "adDBDate":
                ਍ഀ FdType = ਍ഀ "date";
                ਍ഀ break;
           case ਍ഀ "adDBTime":
                ਍ഀ FdType = ਍ഀ "time";
                ਍ഀ break;
           case ਍ഀ "adDBTimeStamp":
                ਍ഀ FdType = ਍ഀ "timestamp";
                ਍ഀ break;
           case ਍ഀ "adChar":
                ਍ഀ FdType = ਍ഀ "char";
                ਍ഀ break;
           case ਍ഀ "adVarChar":
                ਍ഀ FdType = ਍ഀ "varchar";
                ਍ഀ break;
           case ਍ഀ "adLongVarChar":
                ਍ഀ FdType = "text";
           ਍ഀ default:
                ਍ഀ FdType = ਍ഀ "Error:";
           ਍ഀ }
      } else if ( dbms == "MiniSQL" ) { ਍ഀ //9
      }
      return ਍ഀ FdType;
}


function addIndex_onClick(){
     ਍ഀ //check index name
      var name = ਍ഀ document.form1.idxName.value;
      if (name.length ਍ഀ <  0){
           ਍ഀ alert("Index name is ਍ഀ required.");
           ਍ഀ return;
      }
      ch ਍ഀ = name.charAt(0);
      if (ch <  'A' || (ch ਍ഀ > 'Z' && ch <  'a') || ch > 'z') ਍ഀ {
           alert("Invalid ਍ഀ index name.");
           ਍ഀ return;
      }
      ਍ഀ for (i = 0; i <  name.length; i++) ਍ഀ {
           ch = ਍ഀ name.charAt(i);
           ਍ഀ if ( (ch <  '0' || (ch > '9' && ch <  'A') || (ch ਍ഀ > 'Z' && ch <  'a') || ch > 'z') && ch != '_' ਍ഀ ){
                ਍ഀ alert("Invalid index ਍ഀ name.");
                ਍ഀ return;
           ਍ഀ }
      }
      //check ਍ഀ field for index.
      name = ਍ഀ document.form1.idxFields.value;
      if ਍ഀ (name.length <  ਍ഀ 1){
           alert("No ਍ഀ field name for ਍ഀ index.");
           ਍ഀ return;
      }
      ਍ഀ document.form1.SQLsentence.value = ਍ഀ AddIndexSQL();
      ਍ഀ document.form1.submit();
}

function ਍ഀ AddIndexSQL(){
      bUnique = ਍ഀ document.form1.unique.value;

      if ( dbms == ਍ഀ "Cloudscape" ) {
           ਍ഀ if (bUnique == "" || bUnique == "n" || bUnique == ਍ഀ "N")
                ਍ഀ CreateIdxSQL = "CREATE BTREE INDEX ਍ഀ ";
           ਍ഀ else
                ਍ഀ CreateIdxSQL = "CREATE UNIQUE BTREE INDEX ";
      } ਍ഀ else {
           if ਍ഀ (bUnique == "" || bUnique == "n" || bUnique == ਍ഀ "N")
                ਍ഀ CreateIdxSQL = "CREATE INDEX ਍ഀ ";
           ਍ഀ else
                ਍ഀ CreateIdxSQL = "CREATE UNIQUE INDEX ";
      ਍ഀ }
      CreateIdxSQL = CreateIdxSQL + ਍ഀ document.form1.idxName.value + " ON <%=tbName%>  (" + ਍ഀ document.form1.idxFields.value;
      ਍ഀ
      CreateIdxSQL = CreateIdxSQL.substring(0, ਍ഀ CreateIdxSQL.length - 1);
      CreateIdxSQL = ਍ഀ CreateIdxSQL + ")";

      return ਍ഀ CreateIdxSQL;
}

function ਍ഀ ridIndex_onClick(){
      list = ਍ഀ document.form1.listIndex;
      var selidx = ਍ഀ list.selectedIndex;
      if ( selidx <  0 ਍ഀ || selidx >= list.length ਍ഀ )
           ਍ഀ return;

      switch ( dbms ਍ഀ ){
      case ਍ഀ "SQLServer":
      case ਍ഀ "Sybase":
           str = ਍ഀ "DROP INDEX <%=tbName%>." + ਍ഀ list.options[selidx].text;
           ਍ഀ break;
      case ਍ഀ "Access":
           str = ਍ഀ "DROP INDEX " + list.options[selidx].text + " ON <%=tbName%>";
           ਍ഀ break;
      case ਍ഀ "MySQL":
      case ਍ഀ "Oracle":
      case ਍ഀ "Informix":
      case ਍ഀ "Cloudscape":
      case "MiniSQL": ਍ഀ //?
      case "Postgres": ਍ഀ //?
           str = "DROP ਍ഀ INDEX " + ਍ഀ list.options[selidx].text;
           ਍ഀ break;
      ਍ഀ default:
           str = ਍ഀ "";
      }
      ਍ഀ document.form1.SQLsentence.value = str;
      ਍ഀ document.form1.submit();
}


function ਍ഀ listName_onChange(){
      NameIdx = ਍ഀ document.form1.listName.selectedIndex;

      ਍ഀ document.form1.listType.selectedIndex = ਍ഀ NameIdx;
      document.form1.listSize.selectedIndex ਍ഀ = NameIdx;
      ਍ഀ //document.form1.listFields.selectedIndex = NameIdx;
}

function ਍ഀ listType_onChange(){
      TypeIdx = ਍ഀ document.form1.listType.selectedIndex;

      ਍ഀ document.form1.listName.selectedIndex = ਍ഀ TypeIdx;
      document.form1.listSize.selectedIndex ਍ഀ = TypeIdx;
      ਍ഀ //document.form1.listFields.selectedIndex = TypeIdx;
}

function ਍ഀ listSize_onChange(){
      SizeIdx = ਍ഀ document.form1.listSize.selectedIndex;

      ਍ഀ document.form1.listType.selectedIndex = ਍ഀ SizeIdx;
      document.form1.listName.selectedIndex ਍ഀ = SizeIdx;
      ਍ഀ //document.form1.listFields.selectedIndex = SizeIdx;
}

function ਍ഀ listFields_onChange(){
      var ਍ഀ tmp1,tmp2;
      ਍ഀ document.form1.listName.selectedIndex = -1
      ਍ഀ document.form1.listType.selectedIndex = -1;
      ਍ഀ document.form1.listSize.selectedIndex = -1;
      ਍ഀ
      selidx = ਍ഀ document.form1.listFields.selectedIndex;
      if ( ਍ഀ selidx > -1 && selidx <  document.form1.listFields.length ) ਍ഀ {
           tmp1 = ਍ഀ document.form1.idxFields.value;
           ਍ഀ tmp2 = ਍ഀ document.form1.listFields.options[selidx].text;

           ਍ഀ if (tmp2 != "") ਍ഀ {
                ਍ഀ if (tmp1.indexOf(" " + tmp2 + ",") == -1) ਍ഀ {
                     ਍ഀ document.form1.idxFields.value = tmp1 + " " + tmp2 + ਍ഀ ",";
                ਍ഀ }
           ਍ഀ }
      }
      ਍ഀ document.form1.listFields.selectedIndex = -1;
}
</SCRIPT>

਍ഀ
਍ഀ
਍ഀ

 

਍ഀ