Click here to Skip to main content
Click here to Skip to main content
Articles » Database » Database » General » Downloads
 
Add your own
alternative version

Online DB Administration

, 17 Mar 2003
Online administration of your database. Create or modify tables, keys, and indexes. Edit or insert data.
<!-- b.func.asp             - copyright (c) 2001-2002 by Bj�rnar Henden http://www.bhenden.org/ -->
<script language=javascript runat=server>
function Out(s) {
	Response.Write(s);
}

function DebugOut(s) {
	Response.Write("<div style=\"background-color:#FFC0C0; border: 1px solid black; padding: 4px; margin:2px\">" + s + "</div>");
}

function GetFormValue(varname,vardef) {
	if(Request.Form(varname).Count==1)
		return Request.Form(varname).Item;
	else
		return vardef;
}

function PutFormValue(varname,varvalue) {
	Out("<input type=\"hidden\" name=\"" + varname + "\" value=\"" + varvalue + "\"/>\n");
}

function IsNull(v) {
	return ""+v == "null";
}

function GetAllowNullsEnum(i) {
	switch(i) {
	case adIndexNullsAllow:		return "Allow";
	case adIndexNullsDisallow:	return "Disallow";
	case adIndexNullsIgnore:	return "Ignore";
	case adIndexNullsIgnoreAny:	return "IgnoreAny";
	default: return ""+i;
	}
}

function GetKeyTypeEnum(i) {
	switch(i) {
	case adKeyPrimary:		return "Primary";
	case adKeyForeign:		return "Foreign";
	case adKeyUnique:		return "Unique";
	default: return ""+i;
	}
}

function GetRuleEnum(i) {
	switch(i) {
	case adRICascade:		return "Cascade";
	case adRINone:			return "None";
	case adRISetDefault:	return "SetDefault";
	case adRISetNull:		return "SetNull";
	default: return ""+i;
	}
}

function GetPropertyAttributesEnum(value) {
	var s = "";

	if(value & adPropNotSupported)	s += "NotSupported, ";
	if(value & adPropRequired)		s += "Required, ";
	if(value & adPropOptional)		s += "Optional, ";
	if(value & adPropRead)			s += "Read, ";
	if(value & adPropWrite)			s += "Write, ";

	if(s!="") s = s.slice(0,s.length-2);
	return s;
}

</script>

<script language=vbscript runat=server>
' I'll have to admit that VBScript is useful for something :)
function jsFormatDateTime(dato,fmt)
	'SetLocale(0)
	if IsNull(dato) then
		jsFormatDateTime = "&nbsp;"
	else
		jsFormatDateTime = FormatDateTime(CDate(dato),fmt)
	end if
end function
</script>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Bjornar Henden
Web Developer
Norway Norway
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141030.1 | Last Updated 18 Mar 2003
Article Copyright 2002 by Bjornar Henden
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid