Solved

c# adding sql commands

Posted on 2011-09-20
8
248 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

696 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