Hi, I'm using VB.net express edition with SQL server compact for a project and I need a little help. What I'm trying to do is; I want to set a certain column to true or false automatically based on what value another column has entered. I managed to get this working by myself using the 'SQL Pane' in VB and testing it by using execute sql but I don't know what to do now. I assumed that I could just save it and it would work from there but that's not the case, it dissapears from the SQL Pane if I close the project (even though it worked fine when I ran the project the first time), so where do I put it/what do I do with it in order to get this to work?

Any help would be appreciated :)

Ah, sorry I figured this out, I was just doing something really stupid.
Here's what I did if anyone would find it useful:

Public Sub Refresh_T()
        Dim SQLCon As SqlServerCe.SqlCeConnection
        Dim SQLCmd As New SqlServerCe.SqlCeCommand

        Try
            SQLCon = Connect()
            SQLCon.Open()
            SQLCmd = SQLCon.CreateCommand
            SQLCmd.CommandText = _
            "SELECT (Table Columns) CASE WHEN (1) > (2) THEN 'Yes' ELSE 'No' END AS (Column to be filled in) FROM (Table)"

        Catch ex As Exception
            MessageBox.Show("There was a problem connecting to the Database!")

        End Try
    End Sub

It was a lot simpler than I thought it would be :P
(The query is just a placeholder.)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.