ÃæµÄ´úÂëʵÏÖÏòSQL ServerÊý¾Ý¿âÌí¼ÓͼƬºÍÎÄ×ֵŦÄÜ¡£
Ê×ÏÈ£¬ÔÚSQL²éѯ·ÖÎöÆ÷ÖÐÖ´ÐÐÏÂÃæµÄSQLÓï¾ä£¬ÒÔ´´½¨±íºÍ´æ´¢¹ý³Ì¡£
CREATE TABLE Photos (
[name] varchar(50),
[photo] image NULL
)
GO
CREATE PROCEDURE sp_InsertPhoto
@name AS VARCHAR(50),
@image AS IMAGE
AS
INSERT INTO Photos ([name], [photo])
VALUES (@name, @image)
GO
ÏÂÃæ¾ÍÊÇÍêÕûµÄ´úÂ룬¿½±´¼´¿ÉÔËÐУº
Imports System.IO
Public Class Form1
Inherits System.Windows.Forms.Form
Dim cn As SqlClient.SqlConnection
#Region \" Windows Form Designer generated code \"
Public Sub New()
MyBase.New()
\'This call is required by the Windows Form Designer.
InitializeComponent()
\'Add any initialization after the InitializeComponent() call
End Sub
\'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
\'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
\'NOTE: The following procedure is required by the Windows Form Designer
\'It can be modified using the Windows Form Designer.
\'Do not modify it using the code editor.
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
Friend WithEvents SqlCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents Button5 As System.Windows.Forms.Button
Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection()
Me.SqlCommand1 = New System.Data.SqlClient.SqlCommand()
Me.Button3 = New System.Windows.Forms.Button()
Me.Button4 = New System.Windows.Forms.Button()
Me.Button5 = New System.Windows.Forms.Button()
Me.SuspendLayout()
\'
\'Label1
\'
Me.Label1.Location = New System.Drawing.Point(15, 19)
Me.Label1.Name = \"Label1\"
Me.Label1.Size = New System.Drawing.Size(80, 24)
Me.Label1.TabIndex = 0
Me.Label1.Text = \"ÐÕÃû£º\"
\'
\'Label2
\'
Me.Label2.Location = New System.Drawing.Point(11, 64)
Me.Label2.Name = \"Label2\"
±¾ÎÄÕ¸ü¶àÄÚÈÝ£º1 - 2 - 3 - 4 - ÏÂÒ»Ò³>>