Click here to Skip to main content


AnswerRe: How to sent/receive sms in C# application? Pinmemberjschell11-Feb-13 9:15 
GeneralRe: How to sent/receive sms in C# application? PinmemberAnand Gunasekaran12-Feb-13 0:21 
AnswerRe: How to sent/receive sms in C# application? PinprofessionalAmir Mohammad Nasrollahi29-Jul-13 23:23 
QuestionConstructor issue Pinmemberantrock10111-Feb-13 3:41 
I'm having a few issues with my code, i'm following this tutorial Can anyone point me in the right direction. I've included my code below.
The best overloaded method match for 'System.Data.SqlClient.SqlDataAdapter.SqlDataAdapter(string, System.Data.SqlClient.SqlConnection)
<pre lang="c#">Argument 2: cannot convert from 'System.Data.SqlServerCe.SqlCeConnection' to 'System.Data.SqlClient.SqlConnection'

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 Game
    public partial class Form1 : Form
        public OpenFileDialog dialog = new OpenFileDialog();
        System.Data.SqlServerCe.SqlCeConnection con;
        System.Data.SqlServerCe.SqlCeDataAdapter da1;
        DataSet ds1;

        public Form1()
        private void btn_sel_Click(object sender, EventArgs e)
            //dialog.Filter = "*.sdf";
        private void btn_close_Click(object sender, EventArgs e)
        public void loadconnection()
            con = new System.Data.SqlServerCe.SqlCeConnection();
            con.ConnectionString = "Data Source=" + dialog.FileName + ""; //opening dialog (selected file)


            ds1 = new DataSet();
            string sql = "SELECT * From tbl_games";
            da1 = new System.Data.SqlClient.SqlDataAdapter(sql, con);
            da1.Fill(ds1, "Name");

AnswerRe: Constructor issue PinmvpAbhinav S11-Feb-13 3:51 
GeneralRe: Constructor issue Pinmemberantrock10111-Feb-13 4:43 
GeneralRe: Constructor issue PinmvpRichard MacCutchan11-Feb-13 5:45 
GeneralRe: Constructor issue Pinmemberantrock10111-Feb-13 5:55 
GeneralRe: Constructor issue PinmvpRichard MacCutchan11-Feb-13 6:10 
GeneralRe: Constructor issue Pinmemberjibesh11-Feb-13 7:38 

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

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

Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 26 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid