studio NETSOULS

Applying Web To Your Business

JavaScript "isInteger"

When searching for this I found dozens of implementations doing things like parsing each character, string manipulation, and more. But one of the best solutions i could come up is this: More...


The log file for database is full

When dealing with MS SQL (not MYSQL) I’ve seen this error message before, but found very little help on it out there.

The log file for database db_name is full. Back up the transaction log for the database to free up some log space.

Within the MS SQL Query Analyzer, do this:

backup log db_name with truncate_only    
go    
dbcc shrinkfile (db_name_log,0)
go

If anything, this post will be useful for me in the future when one of my MS SQL databases coughs up the error again.


Sometimes you may want to pass a comma separated string as an argument to stored procedure or SQL function and parse within the procedure. This sample code shows how to parse a string based any delimiter you specify. More...


/// <summary>   
/// Converts a DataTable to a string with an html table.   
/// </summary>   
/// <returns></returns>   
public static string DataTableToString(DataTable datatable, 
    bool headers)   
{   
    StringBuilder sb = new StringBuilder();   

    sb.Append("<table border=\"1\">");  

    if (headers)  
    {  
        //write column headings  
        sb.Append("<tr>");  
        foreach (DataColumn datacolumn in datatable.Columns)  
        {  
            sb.Append("<td>" + datacolumn.ColumnName + "</td>");  
        }  
        sb.Append("</tr>");
    }  

    //write table data  
    foreach (DataRow datarow in datatable.Rows)  
    {  
        sb.Append("<tr>");  
        foreach (DataColumn datacolumn in datatable.Columns)  
        {  
            sb.Append("<td>" + datarow[datacolumn].ToString() 
                + "</td>");  
        }  
        sb.Append("</tr>");  
    }  

    sb.Append("</table>");  

    return sb.ToString();  
}

Recent Project Snapshots

  • Mary Kay - Make Over Contest
  • Utility Forms
  • Oncomed
  • Nutrition Vista
  • Forysth Barr - Letter Writer Application
  • Phase One Trials - Content Management System

About Us

studio NETSOULS is a complete IT services company, offering strategy, design, development and implementation of the total solution for your web and IT initiatives. The solutions we provide, enables businesses to leverage leading edge technology to gain sustainable competitive advantages in today's marketplace.

We specialize in designing, developing and deploying the next generation of IT solutions including e-business solutions Read more...

Month List