Results 1 to 2 of 2

Thread: select from where like *solved*

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2003
    Location
    Gent
    Posts
    166

    select from where like *solved*

    Code:
    Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
            If Not IsPostBack Then
    
                Dim CON As OdbcConnection
                Dim CMD As OdbcCommand
                Dim DTR As OdbcDataReader
    
                CON = New OdbcConnection("DSN=STOCK")
                CMD = New OdbcCommand("SELECT * FROM producten where pro_productnaam like 'c*'", CON)
                CON.Open()
    
                GridProducten.DataSource = CMD.ExecuteReader
                GridProducten.DataBind()
                CON.Close()
    
            End If
    
        End Sub

    i want all products starting with "c" to be in my grid. I think i provided everything needed to execute this query... actually it does, but it doesn't return anything...and it should...

    is it possible to use "like" in asp.net?

    any idea what i could be doing wrong?
    Last edited by demoti; Apr 13th, 2004 at 05:11 AM.
    never argue with an idiot, he will bring you down to his level and will beat you through experience

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Nov 2003
    Location
    Gent
    Posts
    166
    % instead of *
    never argue with an idiot, he will bring you down to his level and will beat you through experience

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width