Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to sent/receive sms in C# application? Pin
Amir Mohammad Nasrollahi29-Jul-13 22:23
professionalAmir Mohammad Nasrollahi29-Jul-13 22:23 
QuestionConstructor issue Pin
antrock10111-Feb-13 2:41
antrock10111-Feb-13 2:41 
AnswerRe: Constructor issue Pin
Abhinav S11-Feb-13 2:51
Abhinav S11-Feb-13 2:51 
GeneralRe: Constructor issue Pin
antrock10111-Feb-13 3:43
antrock10111-Feb-13 3:43 
GeneralRe: Constructor issue Pin
Richard MacCutchan11-Feb-13 4:45
mveRichard MacCutchan11-Feb-13 4:45 
GeneralRe: Constructor issue Pin
antrock10111-Feb-13 4:55
antrock10111-Feb-13 4:55 
GeneralRe: Constructor issue Pin
Richard MacCutchan11-Feb-13 5:10
mveRichard MacCutchan11-Feb-13 5:10 
GeneralRe: Constructor issue Pin
Jibesh11-Feb-13 6:38
professionalJibesh11-Feb-13 6:38 
No. You havent done what Abinav suggested to you.
public partial class Form1 : Form
  {
      public OpenFileDialog dialog = new OpenFileDialog();
      System.Data.SqlServerCe.SqlCeConnection con;
      System.Data.SqlServerCe.SqlCeDataAdapter da1;
      DataSet ds1;



      public Form1()
      {
          InitializeComponent();
      }

      private void btn_sel_Click(object sender, EventArgs e)
      {

          //dialog.Filter = "*.sdf";
          dialog.ShowDialog();
          MessageBox.Show(dialog.FileName);
          loadconnection();

      }

      private void btn_close_Click(object sender, EventArgs e)
      {
          Application.Exit();
      }

      public void loadconnection()
      {
          con = new System.Data.SqlServerCe.SqlCeConnection();
          con.ConnectionString = "Data Source=" + dialog.FileName + ""; //opening dialog (selected file)

          con.Open();


          ds1 = new DataSet();
          string sql = "SELECT * From tbl_games";
          da1 = new System.Data.SqlServerCe.SqlCeDataAdapter(sql, con); // Modified this line
          da1.Fill(ds1, "Name");

          con.Close();
      }
  }


Try the above modified code.

BTW: are you writing the above program for WindowsCE device?
Jibesh V P

AnswerRe: Constructor issue Pin
Shameel11-Feb-13 5:02
professionalShameel11-Feb-13 5:02 
Questionif loop cant excuted properly Pin
abhishek91111911-Feb-13 0:36
abhishek91111911-Feb-13 0:36 
AnswerRe: if loop cant excuted properly Pin
Pete O'Hanlon11-Feb-13 0:45
mvePete O'Hanlon11-Feb-13 0:45 
AnswerRe: if loop cant excuted properly Pin
Dave Kreskowiak11-Feb-13 2:09
mveDave Kreskowiak11-Feb-13 2:09 
AnswerRe: if loop cant excuted properly Pin
Bernhard Hiller11-Feb-13 2:27
Bernhard Hiller11-Feb-13 2:27 
GeneralRe: if loop cant excuted properly Pin
Simon_Whale11-Feb-13 3:58
Simon_Whale11-Feb-13 3:58 
AnswerRe: if loop cant excuted properly Pin
Jegan Thiyagesan11-Feb-13 6:27
Jegan Thiyagesan11-Feb-13 6:27 
GeneralRe: if loop cant excuted properly Pin
abhishek91111911-Feb-13 8:06
abhishek91111911-Feb-13 8:06 
GeneralRe: if loop cant excuted properly Pin
DanielSheets19-Feb-13 7:59
DanielSheets19-Feb-13 7:59 
QuestionInvoke schedule task using .NET program Pin
siddisagar11-Feb-13 0:30
siddisagar11-Feb-13 0:30 
AnswerRe: Invoke schedule task using .NET program Pin
Dave Kreskowiak11-Feb-13 2:12
mveDave Kreskowiak11-Feb-13 2:12 
GeneralRe: Invoke schedule task using .NET program Pin
siddisagar11-Feb-13 21:47
siddisagar11-Feb-13 21:47 
GeneralRe: Invoke schedule task using .NET program Pin
Dave Kreskowiak12-Feb-13 11:46
mveDave Kreskowiak12-Feb-13 11:46 
AnswerRe: Invoke schedule task using .NET program Pin
José Amílcar Casimiro11-Feb-13 3:35
José Amílcar Casimiro11-Feb-13 3:35 
Questionstoring images to folder in c# Pin
dhiraj3110-Feb-13 9:40
dhiraj3110-Feb-13 9:40 
AnswerRe: storing images to folder in c# Pin
Garth J Lancaster10-Feb-13 9:53
professionalGarth J Lancaster10-Feb-13 9:53 
Questionstoring images to folder in c# Pin
dhiraj3110-Feb-13 9:38
dhiraj3110-Feb-13 9:38 

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.