Advertisement
Guest User

Untitled

a guest
May 4th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Dim tmpCampaign As String = InputBox("Name of Campaign:", "Setup Campaign")
  2.  
  3. If tmpCampaign = "" Then Exit Sub
  4.  
  5. Dim myQuery As String = "INSERT INTO " & "CAMPAIGNS" & "(" & "CAMPAIGN_NAME" & ") VALUES ('" & tmpCampaign & "');"
  6. 'SQL query to insert data
  7. Dim command As New SqliteCommand(myQuery, SQLconnect)
  8. 'Create a SQLite command which accepts the query and database connection.
  9. SQLconnect.Open()
  10. 'Open the connection with database
  11. command.ExecuteNonQuery()
  12. 'Executes the SQL query
  13. SQLconnect.Close()
  14. 'Close the connection with database
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement