MCTS Programming

www.SarafMoghadam.Com

MCTS Programming

www.SarafMoghadam.Com

گرفتن اطلاعات درایو ها

Imports System.IO

For Each di As DriveInfo In DriveInfo.GetDrives()
     ListBox1.Items.Add(di.Name)
Next

ادامه مطلب ...

دریافت عکس از دیتا بیس

Imports System.Data.SqlClient


Dim mem As New MemoryStream

com.CommandText = "select pic from table1 where name='" & safefilename & "'"

con.Open()

com.Connection = con

Dim image1 As Byte() = com.ExecuteScalar

mem.Write(image1, 0, image1.Length)

PictureBox1.Image = Image.FromStream(mem)

con.Close()

درج عکس در دیتا بیس

Imports System.Data.SqlClient


Dim image() As Byte = File.ReadAllBytes(filename)

con = New SqlConnection("Data Source=.\;Initial Catalog=نام دیتا بیس;Integrated         Security=True;Pooling=False")

com = New SqlCommand("insert into table1 (name,pic) values (@name,@pic)", con)

con.Open()

com.Parameters.AddWithValue("@name", safefilename)

com.Parameters.AddWithValue("@pic", image)

com.ExecuteNonQuery()

con.Close()

دانلود pdf امتحان 536-70 دات نت فریم ورک 2.0

70-536 Microsoft .NET Framework 2.0 Application Development Foundation

دانلود کنید