Conversion from type 'DBNull' to type 'String' is not valid.

Server Error in '/' Application.

Conversion from type 'DBNull' to type 'String' is not valid.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.

Source Error:

Line 180:					catch
Line 181:				end try
Line 182:dim file_skraceno=left(trim(FILE_NAME),17) & trotocka
Line 183:'file_skraceno=UCase(Left(file_skraceno,1)) & LCase(Right(file_skraceno, Len(file_skraceno) - 1))
Line 184:'slika_nova=replace(RecordsetLista("file_url"),".zip","_")&RecordsetLista("file_id")&".jpg"

Source File: c:\inetpub\wwwroot\vector\inc\grid.ascx.vb    Line: 182

Stack Trace:

[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +1073
   Grid.listajFajle(Object conn, Object upitKategorija, Object uvjetKat, Object sortiraj, Object _pLink, Object previousText, Object nextText, Object freevectortext, Object lang) in c:\inetpub\wwwroot\vector\inc\grid.ascx.vb:182
   Grid.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\vector\inc\grid.ascx.vb:543
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.LoadRecursive() +116
   System.Web.UI.Control.LoadRecursive() +206
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2809

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1031