Question : Executing a SQL Update Query From VB

I need to Execute the Update Query (===>) in the attached code snippet. The query will update my SQLDB refered to in the connection string above it.

Question: What is the proper command / syntax to execute query?
Code Snippet:
1:
2:
3:
4:
5:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
Dim CNPOOLS As New SqlClient.SqlConnection("SERVER=WORKTOP;USER ID=sa;PASSWORD=Admin;INITIAL CATALOG=EZTrack;")
 
===>  UPDATE POOLS SET Recurse = 1
Open in New Window Select All

Answer : Executing a SQL Update Query From VB

1:
2:
3:
4:
5:
6:
7:
Set vdnRS = Server.CreateObject("ADODB.Recordset")
vdnRS.ActiveConnection = CNPOOLS 
vdnRS.Source = "UPDATE POOLS SET Recurse = 1"
vdnRS.CursorType = 0
vdnRS.CursorLocation = 2
vdnRS.LockType = 1
vdnRS.Open()
Open in New Window Select All
Random Solutions  
 
programming4us programming4us