www.gusucode.com > 站长俱乐部新闻发布系统精简版 1.01源码程序 > admin/errors/errors.asp

    <link href="css/error_import.css" rel="stylesheet" type="text/css" />
<%

Function CheckForErrors(objConn,objName)
	'response.write "checking for errors...<br>"
	'If there is an error then the count will be greater than zero
	'If objConn.Errors.Count > 0 Then
	'	Response.write "Error connecting" & objConn.Description
	'End If

	'If there is an error then the count will be greater than zero
	If objConn.ActiveConnection.Errors.Count > 0 Then
		'Loop through the errors
		For Each errorObject In objConn.ActiveConnection.Errors
			Response.write "<br><center><table border=1 class=errorTable>" &_
				"<tr><td class='login_view' rowspan=5><img src=images/acidcat_logo.gif><td colspan=2 class='login_view'><b>错误 DB001: ADO 连接错误 " & objName &"</b></td></tr>" &_
				"<tr><td class='login_view'>Number</td><td class='login_view'>" & Hex(errorObject.Number) & "</td></tr>" &_
				"<tr><td class='login_view'>SQLState</td><td class='login_view'>" & errorObject.SQLState & "</td></tr>" &_
				"<tr><td class='login_view'>Source</td><td class='login_view'>" & errorObject.Source & "</td></tr>" &_
				"<tr><td class='login_view'>Description</td><td class='login_view'>" & errorObject.Description & "</td></tr>" &_
				"</table></center><p>"
		Next
	End If
End Function

'  Error DB002
Function DataErrorSDSN(dbPath)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error DB002: Invalid System DSN Database Connection</b><br><br>" &_
		"The database <b>" & dbPath & "</b> could not be found. Please check that:<br>" &_
		"(a) this is the correct location for the database, and<br>" &_
		"(b) that the database exists in that above location.</b>" &_
		"<br><br>The location of the database is set in the file 'admin/connectons/oConn_db.asp'</td></tr>" &_
		"</table></center><p>"
End Function

'  Error DB003
Function DataErrorFDSN(dbPath)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error DB003: Invalid File DSN Database Connection</b><br><br>" &_
		"The database <b>" & dbPath & "</b> could not be found. Please check that:<br>" &_
		"(a) this is the correct location for the database, and<br>" &_
		"(b) that the database exists in that above location.</b>" &_
		"<br><br>The location of the database is set in the file 'admin/connectons/oConn_db.asp'</td></tr>" &_
		"</table></center><p>"	
End Function

'  Error DB004
Function DataErrorNoDSN()
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error DB004: Invalid Database Connection - No DSN type specified</b><br><br>" &_
		"The database could not be found. Please check that:<br>" &_
		"(a) the form that is sending the DSN type is sending it correctly.<br>" &_
		"<br><br>The location of the database is set in the file 'admin/connectons/oConn_db.asp'</td></tr>" &_
		"</table></center><p>"
End Function

'  Error DB005
Function DataErrorNoDirectory()
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error DB005: Invalid Database Connection - No Directory specified</b><br><br>" &_
		"The database could not be found. Please check that:<br>" &_
		"(a) you have provided the name of the directory in which the database is located.<br>" &_
		"</td></tr>" &_
		"</table></center><p>"
End Function

'  Error DB006
Function DataErrorNoDatabase()
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error DB006: Invalid Database Connection - No Database specified</b><br><br>" &_
		"The database could not be found. Please check that:<br>" &_
		"(a) you have provided the file name of your database.<br>" &_
		"</td></tr>" &_
		"</table></center><p>"
End Function

'  Error DB007
Function DataErrorNoDataname()
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error DB007: Invalid Database Connection - No Database name specified</b><br><br>" &_
		"The database could not be found. Please check that:<br>" &_
		"(a) you have provided name of your System database.<br></td></tr>" &_
		"</table></center><p>"
End Function

'  Message DB008
Function DataExistsFDSN(dbPath)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Message DB008: Successful File DSN Connection</b><br><br>" &_
		"The database <b>" & dbPath & "</b> exists." &_
		"<br></td></tr>" &_
		"</table></center><p>"	
End Function

'  Message DB009
Function DataExistsSDSN(dbPath)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Message DB009: Successful System DSN Connection</b><br><br>" &_
		"The database <b>" & dbPath & "</b> exists." &_
		"<br></td></tr>" &_
		"</table></center><p>"	
End Function

'  Error DB010
Function DataUpdateError(dbPath)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error DB010: Unable to Update Database</b><br><br>" &_
		"The database <b>" & dbPath & "</b> exists but cannot be written to. Please check that:<br>" &_
		"(a) the database directory has write permissions, and<br>" &_
		"(b) the database has write permissions.</b>" &_
		"<br></td></tr>" &_
		"</table></center><p>"	
End Function

'  Message DB011
'  Message DB011 is located in the following file
'/install/update1.asp

'  Message DB012
'  Message DB012 is located in the following file
'/install/database_write_success.asp

'  Message DB013
'  Message DB013 is located in the following file
'/install/update1.asp

'  Error INC014
Function DataIncludeError()
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error INC014: Unable to load Server Side Include</b><br><br>" &_
		"The database <b>" & dbPath & "</b> exists but cannot be written to. Please check that:<br>" &_
		"(a) the database directory has write permissions, and<br>" &_
		"(b) the database has write permissions.</b>" &_
		"<br></td></tr>" &_
		"</table></center><p>"	
End Function

'  Error FS015
Function FileSystemError015(uploadsDirVar)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error FS015: Read/Write Directory not found</b><br><br>" &_
	        lang_admin_files_uploadTester_002 & "<br><br>" &_
	        lang_admin_files_uploadTester_003 & "<br><br>" &_
	        lang_admin_files_uploadTester_004 & "<br><br>" &_
	        lang_admin_files_uploadTester_005 & "</div><br>" &_
		"</td></tr>" &_
		"</table></center><p>"	
End Function

'  Error FS016
Function FileSystemError016(uploadsDirVar)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error FS016: The directory does not exist</b><br><br>" &_
	        lang_admin_files_uploadTester_006 & " " & uploadsDirVar & "</B><br><br>" &_
	        lang_admin_files_uploadTester_007 & "<br><br>" &_
	        lang_admin_files_uploadTester_005 & "</div><br>" &_
		"</td></tr>" &_
		"</table></center><p>"	
End Function

'  Error FS017
Function FileSystemError017(uploadsDirVar)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error FS017: Directory doesn't have write access</b><br><br>" &_
		lang_admin_files_uploadTester_008 & " " & uploadsDirVar & "</B><br><br>" &_
		lang_admin_files_uploadTester_009 & "<br><br>" &_
		lang_admin_files_uploadTester_010 & "<br><br>" &_
		lang_admin_files_uploadTester_005 & "</div><br>" &_
		"</td></tr>" &_
		"</table></center><p>"	
End Function

'  Error FS018
Function FileSystemError018(uploadsDirVar)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error FS018: Write permissions OK by no delete permissions</b><br><br>" &_
		lang_admin_files_uploadTester_011 & " " & uploadsDirVar & " </B><br><br>" &_
		lang_admin_files_uploadTester_012 & "<br><br>" &_
		lang_admin_files_uploadTester_005 & "</div><br>" &_
		"</td></tr>" &_
		"</table></center><p>"	
End Function

'  Error FS019
Function FileSystemError019(uploadsDirVar)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error FS019: ADODB object Stream error</b><br><br>" &_
		lang_admin_files_uploadTester_013 & "</B><br><br>" &_
		lang_admin_files_uploadTester_014 & "<br><br>" &_
		lang_admin_files_uploadTester_005 & "</div><br>" &_		
		"</td></tr>" &_
		"</table></center><p>"	
End Function

'  Error DB020
Function DataErrorGeneric(dbPath)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error DB020: Invalid Database Connection</b><br><br>" &_
		"The database <b>" & dbPath & "</b> could not be found. Please check that:<br>" &_
		"(a) this is the correct location for the database, and<br>" &_
		"(b) that the database exists in that above location.</b>" &_
		"<br><br>The location of the database is set in the file 'admin/connectons/oConn_db.asp'</td></tr>" &_
		"</table></center><p>"
End Function

'  Error TXT021
Function TextFileError021(txtPath)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error TXT021: Error Loading Language File</b><br><br>" &_
		"The language file <b>" & txtPath & "</b> could not be loaded.<br>" &_
		"Because the language files are encoded as UTF8, they need to be uploaded to your server using Binary transfer rather than ASCII.<br>" &_
		"<br><br>Check the file transfer settings of your FTP program are set to Binary rather than ASCII.</td></tr>" &_
		"</table></center><p>"
End Function

'  Error SQL022
'  Error SQL022 is located in the following file
'/install_sql_errors.asp

'  Error SQL023
'  Error SQL023 is located in the following files
'/install_sql_setup.asp /instatll_sql_drop.asp

'  Error SQL024
Function DataUpdateError24(dbPath,errorNum,errorMsg)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error SQL024: Unable to Update MS SQL Database</b><br><br>" &_
		"The database exists but cannot be written to. Please check that the following connection string is the DBO login:<br>" &_
		""& dbPath &" <br><br>" &_
		"The database login is set in the file 'admin/connectons/oConn_db.asp'</b><br><br>" &_
		"Raw error message:<br>" &_
		""& errorNum & ": " & errorMsg &" <br>" &_
		"<br></td></tr>" &_
		"</table></center><p>"	
End Function

'  Error SQL025
Function DataUpdateError25(dbPath,errorNum,errorMsg)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error SQL025: Unable to Update mySQL Database</b><br><br>" &_
		"The database exists but cannot be written to. Please check that the following connection string is correct:<br>" &_
		""& dbPath &" <br><br>" &_
		"The database login is set in the file 'admin/connectons/oConn_db.asp'</b><br><br>" &_
		"Raw error message:<br>" &_
		""& errorNum & ": " & errorMsg &" <br>" &_
		"<br></td></tr>" &_
		"</table></center><p>"	
End Function

'  Error SQL026
Function DataUpdateError26(errorMsg)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error SQL026: Unable to connect to Database</b><br><br>" &_
		"This could be because you are trying to connect to a database on a different server.<br><br>" &_
		"Raw error message:<br>" &_
		""& errorMsg &" <br>" &_
		"<br></td></tr>" &_
		"</table></center><p>"	
End Function

'  Error DB027
Function DataErrorDB027(databaseType,errorMsg)
        select case databaseType
        case "msaccess"
                databaseType = "MS Access"
        case "mysql"
                databaseType = "mySQL"
        case "mssql"
                databaseType = "MS SQL Server"
        case else
                databaseType = "Database not set"
        end select
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error DB027: Invalid Database Connection - Database not found</b><br><br>" &_
		"Database type: " & databaseType &"<br>" &_
                "Raw error message:<br>" &_
		""& errorMsg &" <br>" &_
		"</td></tr>" &_
		"</table></center><p>"
End Function

'  Error DB028
Function DataErrorDB028(databaseType,errorMsg)
        select case databaseType
        case "msaccess"
                databaseType = "MS Access"
        case "mysql"
                databaseType = "mySQL"
        case "mssql"
                databaseType = "MS SQL Server"
        case else
                databaseType = "Database not set"
        end select
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error DB028: Invalid Database Connection - Insufficient permissions</b><br><br>" &_
		"The database appears to exist but you don't seem to have the necessary permissions.<br>" &_
                "Database type: " & databaseType &"<br>" &_
                "Raw error message:<br>" &_
		""& errorMsg &" <br>" &_
		"</td></tr>" &_
		"</table></center><p>"
End Function

'  Error FS029
Function FileSystemError029(myFile)
	Response.write "<br><center><table border=1 class=errorTable>" &_
		"<tr><td class='login_view'><img src=images/acidcat_logo.gif>" &_
		"<td colspan=1 class='login_view'><b>  Error FS029: File System Error - Unable to Read File</b><br><br>" &_
		"Make sure that the file does not have read-only permissions and the Images directory has read/write access.<br>" &_
                "File: " & myFile &"<br>" &_
		"</td></tr>" &_
		"</table></center><p>"
End Function
%>