Click here to Skip to main content
15,885,278 members
Home / Discussions / C#
   

C#

 
GeneralRe: Consuming sqlcompact connection with using statement Pin
Eddy Vluggen4-Feb-14 9:09
professionalEddy Vluggen4-Feb-14 9:09 
QuestionVS2012 Pin
Sandhya Bandar1-Feb-14 0:17
Sandhya Bandar1-Feb-14 0:17 
AnswerRe: VS2012 Pin
OriginalGriff1-Feb-14 0:45
mveOriginalGriff1-Feb-14 0:45 
GeneralRe: VS2012 Pin
Sandhya Bandar1-Feb-14 0:59
Sandhya Bandar1-Feb-14 0:59 
GeneralRe: VS2012 Pin
OriginalGriff1-Feb-14 1:07
mveOriginalGriff1-Feb-14 1:07 
AnswerRe: VS2012 Pin
BillWoodruff1-Feb-14 0:53
professionalBillWoodruff1-Feb-14 0:53 
GeneralRe: VS2012 Pin
Sandhya Bandar1-Feb-14 0:57
Sandhya Bandar1-Feb-14 0:57 
QuestionSqlDependency process... Pin
byerkan31-Jan-14 23:53
byerkan31-Jan-14 23:53 
Hi Dear Friends;
Want to ask a question about SqlDependency.
C # sql operation with SqlDependency in my side I want to see.
Example:
I got 2 MSSQL database,
are the first data in my database.
When you take action in the first database, Current Data I want to add my second database.
SqlDependency with the insert, update, delete, how do you find out the line?
I use the sample code I'm writing.
When you take action on this sql code can trigger windows form.
I'm asking transactions which took place in line?

I'm sorry for bad english.

#region Using directives

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Data.SqlClient;

#endregion

namespace NotifySample
{
    partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        SqlConnection con;
        SqlCommand cmd;
        SqlDependency dep;
        SqlDataAdapter da;
        DataTable dt;

        private void btnVeriCek_Click(object sender, EventArgs e)
        {
            con = new SqlConnection("data source=localhost;initial catalog=Dukkan;integrated security=SSPI");
            con.Open();
            cmd = new SqlCommand("Select DetayID,PersonelID,Ad,Soyad,Mail From dbo.PersonelDetay", con);
            dep = new SqlDependency(cmd);
               SqlDependency.Start("data source=localhost;initial catalog=Dukkan;integrated security=SSPI");
            dep.OnChange+=new OnChangeEventHandler(dep_OnChange);
            da = new SqlDataAdapter(cmd);
            dt = new DataTable();
            da.Fill(dt);
            dgVeriler.DataSource = dt;
        }

        void dep_OnChange(object sender, SqlNotificationEventArgs e)
        {
            MessageBox.Show("THIS AREA SQL INSERT, UPDATE, DELETED WANT TO SEE DATA");
//THIS AREA SQL INSERT, UPDATE, DELETED WANT TO SEE DATA
        }
    }
}

AnswerRe: SqlDependency process... Pin
Eddy Vluggen1-Feb-14 6:45
professionalEddy Vluggen1-Feb-14 6:45 
QuestionHow to export extjs chart into pdf? Pin
Janu Kya Kar Rahi ho31-Jan-14 18:53
Janu Kya Kar Rahi ho31-Jan-14 18:53 
QuestionRe: How to export extjs chart into pdf? Pin
Richard MacCutchan31-Jan-14 22:16
mveRichard MacCutchan31-Jan-14 22:16 
QuestionHow do I keep a player from override another player's move by reclicking a button Pin
Member 1045350931-Jan-14 9:29
Member 1045350931-Jan-14 9:29 
AnswerRe: How do I keep a player from override another player's move by reclicking a button Pin
Dave Kreskowiak31-Jan-14 13:45
mveDave Kreskowiak31-Jan-14 13:45 
AnswerRe: How do I keep a player from override another player's move by reclicking a button Pin
agent_kruger31-Jan-14 23:13
professionalagent_kruger31-Jan-14 23:13 
JokeRe: How do I keep a player from override another player's move by reclicking a button Pin
Eddy Vluggen1-Feb-14 8:17
professionalEddy Vluggen1-Feb-14 8:17 
GeneralRe: How do I keep a player from override another player's move by reclicking a button Pin
agent_kruger1-Feb-14 18:45
professionalagent_kruger1-Feb-14 18:45 
Questionc# extension methods syntax question Pin
Jon Joeney30-Jan-14 23:23
Jon Joeney30-Jan-14 23:23 
AnswerRe: c# extension methods syntax question Pin
harold aptroot31-Jan-14 0:05
harold aptroot31-Jan-14 0:05 
AnswerRe: c# extension methods syntax question Pin
OriginalGriff31-Jan-14 0:23
mveOriginalGriff31-Jan-14 0:23 
GeneralRe: c# extension methods syntax question Pin
BillWoodruff31-Jan-14 5:56
professionalBillWoodruff31-Jan-14 5:56 
GeneralRe: c# extension methods syntax question Pin
OriginalGriff31-Jan-14 6:06
mveOriginalGriff31-Jan-14 6:06 
AnswerRe: c# extension methods syntax question Pin
BillWoodruff31-Jan-14 0:57
professionalBillWoodruff31-Jan-14 0:57 
GeneralRe: c# extension methods syntax question Pin
Richard Deeming31-Jan-14 2:05
mveRichard Deeming31-Jan-14 2:05 
GeneralRe: c# extension methods syntax question Pin
BillWoodruff31-Jan-14 5:48
professionalBillWoodruff31-Jan-14 5:48 
AnswerRe: c# extension methods syntax question Pin
Ennis Ray Lynch, Jr.31-Jan-14 9:49
Ennis Ray Lynch, Jr.31-Jan-14 9:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.