'===========================================================
'===========================================================
' Function: gInsertPropBrochure_others
' Purpose: Optional Insert for Non-newDevelopment Property
'============================================================
Public Shared Function gInsertPropBrochure_others(ByVal iList As Integer, _
ByVal sSpecification As String, _
ByVal sLocation As String, _
ByVal sAmenities As String, _
ByVal sParking As String, _
ByVal sManagement As String, _
ByVal sService As String) As Integer
'Open connection
Dim objConn As SqlConnection = openDBConnection()
Dim strSQL As String = "INSERT INTO PropBrochure (idList, Specification, Location, Amenities, Parking, Management, Services) VALUES(@idList, @Specification, @Location, @Amenities, @Parking, @Management, @Services)"
Dim objCmd As SqlCommand = New SqlCommand(strSQL, objConn)
'Input Params
objCmd.Parameters.Add("@idList", SqlDbType.Int).Value = iList
objCmd.Parameters.Add("@Specification", SqlDbType.VarChar, 2000).Value = sSpecification
objCmd.Parameters.Add("@Location", SqlDbType.VarChar, 1000).Value = sLocation
objCmd.Parameters.Add("@Amenities", SqlDbType.VarChar, 2000).Value = sAmenities
objCmd.Parameters.Add("@Parking", SqlDbType.VarChar, 1000).Value = sParking
objCmd.Parameters.Add("@Management", SqlDbType.VarChar, 1000).Value = sManagement
objCmd.Parameters.Add("@Services", SqlDbType.VarChar, 100).Value = sService
objCmd.ExecuteNonQuery()
'Clean up
objCmd.Dispose()
closeDBConnection(objConn)
Return 0
End Function
ADO.NET Insert command function
最新推荐文章于 2019-04-10 12:00:59 发布
