Results 1 to 4 of 4

Thread: Binding text boxes to SQL Statements

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2007
    Location
    Nottingham
    Posts
    53

    Binding text boxes to SQL Statements

    So I've changed this post entirely as the first question was stupid and I figured it out... So, now I've got my dataset filled with a table:

    Code:
        Public Function FillDataset()
    
            Dim connection As SqlCeConnection
            Dim command As SqlCeCommand
            Dim dataAdapter As SqlCeDataAdapter
            Dim dataSet As DataSet
    
            connection = New SqlCeConnection("data source=dir1")
    
            command.CommandText = "SELECT * FROM tblDealer"
            command.Connection = connection
    
            dataAdapter = New SqlCeDataAdapter(command)
            dataAdapter.Fill(dataSet)
    
            Return True
        End Function
    Is it possible to put some text boxes on my form and run SQL Select statments on them to display data from a dataset? I'm reading something about datagrids but I wanted to just use text boxes (and then update statements on buttons later)

    Thanks a bunch
    Last edited by Pzykotik; Sep 5th, 2007 at 03:54 AM.

  2. #2

    Thread Starter
    Member
    Join Date
    Aug 2007
    Location
    Nottingham
    Posts
    53

    Re: Binding text boxes to SQL Statements

    Ok, so I'm reading loads about how this can be done but it all seems to complicated! I'm obviously not very good at this whole vb.NET CF thing... =( There has to be a simple way of going about it!?

    Anybody...?

  3. #3
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Binding text boxes to SQL Statements

    Never tried it but on the databindings properties of the textbox supposedly you can bing your data. Althought it's very simpe compared to .net windows applications. Give it a try

  4. #4
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Binding text boxes to SQL Statements

    Hi,
    this quick start sample shows how to bind a text box using an XML file as a source - this should get you started.

    The site has quite a few compact framework samples with source code - it may be worth you having a look at them to help get you started.

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

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