文件名称:修改表结构的 asp C# 源代码
文件大小:12KB
文件格式:RAR
更新时间:2013-06-20 02:14:05
修改表结构的 asp
var sNewFieldString = ''
+ '\n' + getObjByID.toString()
+ '\n' + showFieldType.toString()
+ '\n' + checkFieldType.toString()
+ '\n' + checkInput.toString()
+ '\n' +'function doNewField(o){'
+ '\n' +' var sSqlString = "";'
+ '\n' +' if(o.fieldName.value.length==0){alert("请输入字段名");o.fieldName.focus();return false;}'
+ '\n' +' if(!checkInput(o.fieldName.value)){alert("名称中包含非法字符,请重新输入");return false;}'
+ '\n' +' sSqlString = "ALTER TABLE ["+o.sTblName.value+"] \\n"'
+ '\n' +' + " ADD COLUMN ["+o.fieldName.value+"] "+o.fieldType[o.fieldType.selectedIndex].value'
+ '\n' +' + (o.fieldSize.value?"("+o.fieldSize.value+")":"") + " "'
+ '\n' +' + (o.isNULL.checked?"NULL":"NOT NULL") + " \\n"'
+ '\n' +' + (o.fieldPK.checked?"PRIMARY KEY":"") + " "'
+ '\n' +' + (parseInt(o.fieldSeed.value)&&parseInt(o.fieldIncre.value)?"IDENTITY ("+o.fieldSeed.value+","+o.fieldIncre.value+")":"") + " \\n"'
+ '\n' +' + (o.fieldDefault.value?"DEFAULT "+o.fieldDefault.value+" WITH VALUES":"");'
+ '\n' +' var oFormSQL = window.opener.getObjByID("formSQL");'
+ '\n' +' oFormSQL.sSqlString.value = sSqlString;'
+ '\n' +' oFormSQL.sOper.value = "Design";'
+ '\n' +' if(!confirm("确认要添加新列吗?")) return false;'
+ '\n' +' oFormSQL.submit();'
+ '\n' +'}'
+ '\n' +''
+ '\n' +''
+ '\n' +' '
+ '\n' +'
';
var CCNS_program = "COCOON DB Tools";
var CCNS_version = "Final Release";
function getObjByID(n) {
//This function was re-written form DreamWeaver v4.01 by Sunrise_Chen.
var p,i,x;
var d=document;
if(!(x=d[n])&&d.all) x=d.all[n];
for(i=0;!x&&i
【文件预览】:
DbTools
----CCDbTScript.js(13KB)
----DbTools.asp(36KB)