Dim te() As Byte = Rd.Item(0)
Dim stream1 As New System.IO.MemoryStream(te)
Dim image As System.Drawing.Image = System.Drawing.Image.FromStream(stream1)
image = image.GetThumbnailImage(200, 250, Nothing, Nothing)
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg)
Dim conn As String
conn = "server=(local);database=JGKSSDB;user id=sa;pwd="
Dim mySqlconn As New SqlConnection(conn)
mySqlconn.Open()
Dim SQlselect As String
SQlselect = "select top 1 pic from map"
Dim Cmd As New SqlCommand(SQlselect, mySqlconn)
Dim Rd As SqlDataReader
Rd = Cmd.ExecuteReader
While Rd.Read()
Dim te() As Byte = Rd.Item(0)
Dim stream1 As System.IO.MemoryStream
stream1 = New System.IO.MemoryStream((te))
Dim image As System.Drawing.Image = System.Drawing.Image.FromStream(stream1)
image = image.GetThumbnailImage(200, 250, Nothing, Nothing)
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg)
End While
Rd.Close()
mySqlconn.Close()