|
-
Sep 3rd, 2007, 08:26 AM
#1
Thread Starter
Member
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.
-
Sep 5th, 2007, 04:35 AM
#2
Thread Starter
Member
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...?
-
Sep 5th, 2007, 07:04 AM
#3
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
-
Sep 5th, 2007, 07:12 AM
#4
Frenzied Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|