Yeah,sql server or sql compact, the sql string is the same
of course you have to change it to fit you, but it give you a idea
otherwise you can make stored procedures in SQL and Call them from VB.net
Like this:(It from one program i am working on and it is place in a "Data Class")
Dim conn As New SqlConnection(My.Settings.ConnString)
If conn.State = ConnectionState.Closed Then conn.Open()
Dim trans = conn.BeginTransaction
Using cmd As New SqlCommand()
Try
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "uspSaveCustomer"
cmd.Connection = conn
cmd.Transaction = trans
cmd.Parameters.Add("@custID", SqlDbType.VarChar).Value = ID
cmd.Parameters.Add("@custTitle", SqlDbType.VarChar).Value = Title
cmd.Parameters.Add("@custFirstName", SqlDbType.VarChar).Value = FirstName
cmd.Parameters.Add("@custLastName", SqlDbType.VarChar).Value = LastName
cmd.Parameters.Add("@custAddress", SqlDbType.VarChar).Value = Address
cmd.Parameters.Add("@custLevel", SqlDbType.VarChar).Value = Level
cmd.Parameters.Add("@custPostalCode", SqlDbType.Int).Value = PostalCode
cmd.Parameters.Add("@custPostalCity", SqlDbType.VarChar).Value = PostalCity
cmd.Parameters.Add("@custPhone", SqlDbType.VarChar).Value = Phone
cmd.Parameters.Add("@custExt", SqlDbType.VarChar).Value = Ext
cmd.Parameters.Add("@custMobile", SqlDbType.VarChar).Value = Mobile
cmd.Parameters.Add("@custFax", SqlDbType.VarChar).Value = Fax
cmd.Parameters.Add("@custEmail", SqlDbType.VarChar).Value = Email
cmd.Parameters.Add("@custInternet", SqlDbType.VarChar).Value = Internet
cmd.Parameters.Add("@custCompanyID", SqlDbType.Int).Value = CompanyID
cmd.Parameters.Add("@custStatus", SqlDbType.SmallInt).Value = Status
cmd.Parameters.Add("@custType", SqlDbType.SmallInt).Value = Type
cmd.Parameters.Add("@custOtherInfo", SqlDbType.VarChar).Value = OtherInfo
cmd.Parameters.Add("@custDeleted", SqlDbType.Bit).Value = CInt(Deleted)
cmd.Parameters.Add("@custAllowCompOrders", SqlDbType.Bit).Value = CInt(AllowCompOrders)
cmd.Parameters.Add("@custIsCompany", SqlDbType.Bit).Value = CInt(IsCompany)
cmd.Parameters.Add("@custTakenBy", SqlDbType.VarChar).Value = TakenBy
cmd.Parameters.Add("@custRegDate", SqlDbType.SmallDateTime).Value = RegDate
cmd.Parameters.Add("@custBirthDate", SqlDbType.SmallDateTime).Value = BirthDate
cmd.ExecuteScalar
trans.Commit()
If conn.State = ConnectionState.Open Then conn.Close()
...........(Some error handling code after here)
Hope it give you something to work with...