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; ഀ
}
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;
if ഀ
(fdT.indexOf("Error:") != -1) ഀ
{ alert("Not ഀ
support this field type( " + adoType + " ) in the specified ഀ
database."); ഀ
return "Error:"; ഀ
}