?
Solved

c# adding sql commands

Posted on 2011-09-20
8
Medium Priority
?
249 Views
Last Modified: 2012-06-16
I having problems in added sql command in c#

what I need is to have a text box that searches a sql database and is pulls the data and displayed in datagrid view.

I have got the sql connected using the dataset the field which I am searching for is clientId which is in a table called tbl_clientaddress

0
Comment
Question by:beridius
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 36566160
post your code
0
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 36566519
To execute a command and to fill grid refer the link:
http://www.codeproject.com/KB/aspnet/DataGridView__GridView.aspx 
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:beridius
ID: 36566964
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Search : Form
    {
        public Search()
        {
            InitializeComponent();
        }



        private void customersearch_Click(object sender, EventArgs e)
        {
           
        }


        private void button1_Click(object sender, EventArgs e)
        {

        }

        private void CleintId_TextChanged(object sender, EventArgs e)
        {

        }
        private void GetRowsByFilter()
        {
            
        }

        private void bindingSource1_CurrentChanged(object sender, EventArgs e)
        {

        }

        private void statusStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
                    }

        private void progressBar1_Click(object sender, EventArgs e)
        {

        }

        private void Search_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'interiorsDataSet1.tbl_ClientAddress' table. You can move, or remove it, as needed.
            this.tbl_ClientAddressTableAdapter.Fill(this.interiorsDataSet1.tbl_ClientAddress);
THIS IS WHERE I NEED THE SEARCH TO BE
        }
    }

Open in new window

I hope this helps
0
 
LVL 2

Accepted Solution

by:
beridius earned 0 total points
ID: 36567680
I think it should be something like

 
this.tbl_ClientAddressBindingSource.Find( 

Open in new window


but then I get stuck in what is needed

I need to find clientID which is a table called clientaddress
0
 
LVL 16

Assisted Solution

by:Easwaran Paramasivam
Easwaran Paramasivam earned 2000 total points
ID: 36571757
ClientID is related with web application. But from your code it seems windows application. Please do clarify.
0
 
LVL 2

Author Comment

by:beridius
ID: 36573897
its a windows application sorry
0
 
LVL 2

Author Closing Comment

by:beridius
ID: 38090624
I used the syntax
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question