Tuesday, April 22, 2008

i am successfully storing images into database by converting images into bytes.

SqlCommand cmdSelect=new SqlCommand("select Picture from tblImgData where ID=@ID",this.sqlConnection1);
cmdSelect.Parameters.Add("@ID",SqlDbType.Int,4);
cmdSelect.Parameters["@ID"].Value=this.editID.Text
;
this.sqlConnection1.Open();byte[] barrImg=(byte[])cmdSelect.ExecuteScalar();
string strfn=Convert.ToString(DateTime.Now.ToFileTime());
FileStream fs=new FileStream(strfn,FileMode.CreateNew,FileAccess.Write);
fs.Write(barrImg,0,barrImg.Length);
fs.Flush();
fs.Close();
pictureBox1.Image=Image.ఫ్రం
File(strfn);

---------------------
http://www.odetocode.com/Articles/172.aspx

---------------------

Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim myCommand As SqlCommand = New SqlCommand("sp_das_person_real_images_sel", myConnection)
myCommand.CommandType = CommandType.StoredProcedure
Try
myConnection.Open()
DG_Persons.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection)
DG_Persons.DataBind()
Catch
SQLexc As SqlException
Response.Write("Error occured while Generating Data. Error is " & SQLexc.ToString())
End Try

javascript

How to hide a button:
-----------------------
function hide()
{
document.form1.check.style.visibility = 'hidden';
return;
}

----------------------

Call the above function in button Onclick="hide();"

Chat Programm in ASP.NET

http://www.codeproject.com/KB/applications/SimpleChat.aspx
http://www.codeproject.com/KB/applications/AliAspNetChat.aspx
http://forums.devarticles.com/net-development-43/simple-chat-page-in-asp-net-using-c-7566.html
http://www.codeproject.com/KB/aspnet/Ajax_Chat.aspx

REF .codeproject

How to open filedialog in web applications

call below function when u need to open dialog box
DisplayDownloadDialog("MyDown.doc")
----------------------------------------------------------
Sub DisplayDownloadDialog(ByVal PathVirtual As String)

Dim strPhysicalPath As String
Dim objFileInfo As System.IO.FileInfo
Try
strPhysicalPath = Server.MapPath(PathVirtual)
'exit if file does not exist
If Not System.IO.File.Exists(strPhysicalPath) Then Exit Sub
objFileInfo = New System.IO.FileInfo(strPhysicalPath)
Response.Clear()
'Add Headers to enable dialog display
Response.AddHeader("Content-Disposition", "attachment; filename=" & objFileInfo.Name)
Response.AddHeader("Content-Length", objFileInfo.Length.ToString())

Response.ContentType = "application/octet-stream"
Response.WriteFile(objFileInfo.FullName)


Catch
'on exception take no action
'you can implement differently
Finally

Response.End()

End Try
End Sub

How to Restore database back-up(.bak) file


STEP-1




STEP-2



STEP-3



STEP-4





STEP-5




STEP-6

NEWS

http://www.eenadu.net/

http://www.sakshi.com/

http://www.andhrajyothy.com/

http://www.greatandhra.com

http://www.vaarttha.com/

Cursors

Static cursors
Dynamic cursors
Forward-only cursors
Keyset-driven cursors

Static cursors:
A static cursor always displays the result set as it was when the cursor was opened. Static cursors are always read-only.

Dynamic Cursors:
Dynamic cursors are the opposite of static cursors. Dynamic cursors reflect all changes made to the rows in their result set when scrolling through the cursor.

Forward-only Cursors:
A forward-only cursor does not support scrolling; it supports only fetching the rows serially from the start to the end of the cursor.

Keyset-driven Cursors:
The keyset is the set of the key values from all the rows that qualified for the SELECT statement at the time the cursor was opened

Loading...