Imports System.Data.SqlClient Public Class Imsglobe_syncLocal Protected Overrides Sub OnStart(ByVal args() As String) ' Add code here to start your service. This method should set things ' in motion so your service can do its work. Dim sqlstr As String Dim ds As New Global.System.Data.DataSet Dim constr As String = "Data Source=(local);Initial Catalog=InfoBank;Integrated Security=True" Dim Cmd As Global.System.Data.SqlClient.SqlCommand sqlstr = "INSERT INTO [dbo].[Root_tbl] ([RootName] ,[UsrLevel]) VALUES ('testing',5)" Dim Con As Global.System.Data.SqlClient.SqlConnection = New Global.System.Data.SqlClient.SqlConnection(constr) Con.Open() Cmd = New Global.System.Data.SqlClient.SqlCommand(sqlstr, Con) Cmd.ExecuteNonQuery() Cmd.Dispose() Con.Close() End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)