Guest User

Untitled

a guest
Jan 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. Using stCon As New SqlConnection(ConfigurationManager.ConnectionStrings("SeedTrackerConnectionString").ConnectionString)
  2.  
  3. stCon.Open()
  4.  
  5. Dim sInsertCommand As New SqlCommand("INSERT INTO [SeedTracker].[dbo].[Revisions] ([STID],[LID],[UID],[isCross],[isMutant],[Genotype],[TVal],[SEQ],[NumLabels],[Label],[ExpName],[Plant],[Type],[Plasmid],[Cultivar],[Container],[Source],[Notes],[CrossExpName],[CrossExpDesc],[Mother],[Father],[LabBook],[Pages],[ELBURL],[Mutagen],[isTrash],[RevUID],[TimeStamp]" & _
  6. "SELECT [STID],[LID],[UID],[isCross],[isMutant],[Genotype],[TVal],[SEQ],[NumLabels],[Label],[ExpName],[Plant],[Type],[Plasmid],[Cultivar],[Container],[Source],[Notes],[CrossExpName],[CrossExpDesc],[Mother],[Father],[LabBook],[Pages],[ELBURL],[Mutagen],[isTrash],@sUID,[TimeStamp]" & _
  7. "FROM [SeedTracker].[dbo].[SeedTracker] WHERE STID = @sSTID", stCon)
  8.  
  9. sInsertCommand.Parameters.AddWithValue("@sUID", sUID)
  10. sInsertCommand.Parameters.AddWithValue("@sSTID", sSTID)
  11. sInsertCommand.ExecuteNonQuery()
  12.  
  13. stCon.Close()
  14.  
  15. End Using
Add Comment
Please, Sign In to add comment