Tag Archives: SQL Server

Database Size

 Exec sp_spaceused    Advertisements

Posted in Databases, DBA | Tagged , , , | Leave a comment

Read PDF from a Database and Open it into a Frame

IHttpHandler is aowsome. You read your file in the buffer and just send it to src as if it is a named file, so no need to read and save a temporary file in client’s PC. iframePDF1.Attributes.Add(“src”, “ShowPDF.ashx?pID=” & Request.QueryString(“pID”)) … Continue reading

Posted in Databases, Programming, SQL-Server, VB.NET | Tagged , , , , , | Leave a comment

Error msg: No mapping exists from object type System.Data.SqlClient.SqlParameter to a known managed provider native type.

        Dim pID As New SqlParameter(“@ID”, SqlDbType.Int)         pID.Value = TextBoxParentID.Text         cmd.Parameters.AddWithValue(“@ID”, pID) I changed it to:         Dim pID As New SqlParameter(“@ID”, SqlDbType.Int)         pID.Value = TextBoxParentID.Text         cmd.Parameters.Add(pID) and it works also this works:         Dim pID … Continue reading

Posted in Databases, Programming, SQL-Server, VB.NET | Tagged , , , , , | 3 Comments

ExecuteReader vs ExecuteNonQuery vs ExecuteScalar

ExecuteReader() For SELECT statement ExecuteNonQuery() For INSERT , UPDATE and DELETE Not for SELECT statement. ExecuteScalar() For images   Ahmed.

Posted in Comparison, Databases, Programming, SQL-Server, VB.NET | Tagged , , , , , , , , , | Leave a comment

Increasing the Maximum Upload Size

The 4MB default is set in machine.config, but you can override it in your web.config. For instance, to expand the upload limit to 20MB, you’d do this: <system.web>   <httpRuntime executionTimeout=”240″ maxRequestLength=”20480″ /> </system.web>

Posted in Databases, Programming, SQL-Server, VB.NET | Tagged , , , , | Leave a comment

How to Save and Display a PDf/Word file ?

For displaying, it will save the pdf/word to temp folder then open it and after closing will delete the temp file.

Posted in Databases, Programming, SQL-Server, VB.NET | Tagged , , , , | Leave a comment