  | 
		 		   | 
	  	    
          
            
			
	
			
			 
                นี่คือโค้ดบันทึกค่ะ 
 
Code (VB.NET) 
Dim myCommand As SqlCommand = Conn.CreateCommand()
        Dim sqlSave As String
If CBool(MessageBox.Show("บันทึกใช่หรือไม่ !!!", "ผลการทำงาน", MessageBoxButtons.YesNo, MessageBoxIcon.Information) = DialogResult.Yes) Then
            sqlSave = "INSERT INTO [Passport] ([Passport_No],[Name_in_Thai],[Type],[Country_ID],[DateOfBirth],[PlaceOfBirth],[DateOfIssue],[DateOfExpiry],[Authority],[L_Passport_No],[Passenger_ID]) VALUES (@Passport_No,@Name_in_Thai,@Type,@Country_ID,@DateOfBirth,@PlaceOfBirth,@DateOfIssue,@DateOfExpiry,@Authority,@L_Passport_No,@Passenger_ID)"
            myCommand = New SqlCommand(sqlSave, Conn)
            myCommand.Parameters.AddWithValue("@Passport_No", Me.tbxPassport_No.Text)
            myCommand.Parameters.AddWithValue("@Name_in_Thai", Me.tbxName.Text)
            myCommand.Parameters.AddWithValue("@Type", Me.tbxType.Text)
            myCommand.Parameters.AddWithValue("@Country_ID", Me.cbCountry.Text)
            myCommand.Parameters.AddWithValue("@DateOfBirth", dtDOB.Text)
            myCommand.Parameters.AddWithValue("@PlaceOfBirth", Me.tbxPOB.Text)
            myCommand.Parameters.AddWithValue("@DateOfIssue", dtIssueDate.Text)
            myCommand.Parameters.AddWithValue("@DateOfExpiry", dtExpiryDate.Text)
            myCommand.Parameters.AddWithValue("@Authority", Me.tbxAuthority.Text)
            myCommand.Parameters.AddWithValue("@L_Passport_No", Me.tbxLastPassport.Text)
            myCommand.Parameters.AddWithValue("@Passenger_ID", Me.tbxPassengerID.Text)
            With myCommand
                .CommandType = CommandType.Text
                .CommandText = sqlSave
                .Connection = Conn
                .ExecuteNonQuery()
            End With
            MessageBox.Show("บันทึกลงฐานข้อมูล  เรียบร้อยแล้ว !!!", "ผลการทำงาน", MessageBoxButtons.OK, MessageBoxIcon.Information)
        End If
 
 
 
นี่คือที่มัน error 
 
 
 
  Tag : .NET, Ms SQL Server 2005, Win (Windows App), VB.NET               
                        | 
           
          
            | 
			
                             | 
           
          
            
              
                   | 
                   | 
                   | 
               
              
                   | 
                
                    
                      | Date :
                          2011-02-07 15:48:02 | 
                      By :
                          zeenanz | 
                      View :
                          1334 | 
                      Reply :
                          4 | 
                     
                  | 
                   | 
               
              
                   | 
                   | 
                   | 
               
              | 
           
          
            | 
			 | 
           
         
	    
		             | 
		
			  |