Click here to Skip to main content
15,891,777 members
Home / Discussions / C#
   

C#

 
GeneralRe: Select local class pointer to static class instance with property explorer (Best description I can manage!). Pin
kevsticle25-May-10 3:37
kevsticle25-May-10 3:37 
GeneralRe: Select local class pointer to static class instance with property explorer (Best description I can manage!). Pin
Michel Godfroid5-May-10 6:25
Michel Godfroid5-May-10 6:25 
AnswerRe: Select local class pointer to static class instance with property explorer (Best description I can manage!). Pin
OriginalGriff5-May-10 6:09
mveOriginalGriff5-May-10 6:09 
QuestionDisplay List items? Pin
spankyleo1235-May-10 1:12
spankyleo1235-May-10 1:12 
AnswerRe: Display List items? Pin
Henry Minute5-May-10 1:15
Henry Minute5-May-10 1:15 
AnswerRe: Display List items? Pin
Peace ON5-May-10 2:01
Peace ON5-May-10 2:01 
AnswerRe: Display List items? Pin
Luc Pattyn5-May-10 2:52
sitebuilderLuc Pattyn5-May-10 2:52 
QuestionTCP/IP connexion failed in csharp smart device Pin
Tunisien865-May-10 0:58
Tunisien865-May-10 0:58 
Hi,
I develop a GMAO csharp smart device application.I try now to connect to my remote database.mdf using TCP/IP protocol.I created a combobox where i want to extract informations from my table using this select statement:
"SELECT DISTINCT NObt FROM 4BT ";
.For my IPadreess of my computer,I use the ipconfig/all command and I take the
IPv4 Address. . . . . . . . . . . : 192.168.1.4(Preferred)

My hole code is like this:
using System;
using System.Linq;
using System.Data.SqlServerCe;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ModeDifféré
{
    public partial class Form6 : Form
    {
        public Form6()
        {
            InitializeComponent();
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void Form6_Load(object sender, EventArgs e)
        {
            string sConnection = "Data Source=192.168.1.4,1433;Initial Catalog=GMAO;User ID=sa;Password=sa;";
            string sSQL = "SELECT DISTINCT NObt FROM 4BT";
            SqlCeCommand comm = new SqlCeCommand(sSQL, new SqlCeConnection(sConnection));
            SqlCeDataReader dr = null;
            try
            {
                comm.Connection.Open();
                dr = comm.ExecuteReader();
                while (dr.Read())
                    comboBox1.Items.Add(dr[0]);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }
            dr.Close();
            comm.Connection.Close();
        }
    }
}

When running,this error appears:
Unknown connection option in connection string: initial catalog.

As an information,I follow the steps of this link:http://netcf2.blogspot.com/2005/12/accessing-sql-server-express-from.html[^]
What is the problem???
Thank u for all u suggestion
Regards
Marwen Smile | :)
AnswerRe: TCP/IP connexion failed in csharp smart device Pin
Eddy Vluggen5-May-10 1:03
professionalEddy Vluggen5-May-10 1:03 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien865-May-10 1:10
Tunisien865-May-10 1:10 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Eddy Vluggen5-May-10 1:22
professionalEddy Vluggen5-May-10 1:22 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien865-May-10 2:25
Tunisien865-May-10 2:25 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien865-May-10 2:52
Tunisien865-May-10 2:52 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Michel Godfroid5-May-10 4:04
Michel Godfroid5-May-10 4:04 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien865-May-10 4:22
Tunisien865-May-10 4:22 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Michel Godfroid5-May-10 4:47
Michel Godfroid5-May-10 4:47 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien865-May-10 5:24
Tunisien865-May-10 5:24 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Michel Godfroid5-May-10 5:52
Michel Godfroid5-May-10 5:52 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien866-May-10 1:43
Tunisien866-May-10 1:43 
AnswerRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien8611-May-10 6:03
Tunisien8611-May-10 6:03 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Eddy Vluggen5-May-10 4:24
professionalEddy Vluggen5-May-10 4:24 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien865-May-10 4:49
Tunisien865-May-10 4:49 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien866-May-10 2:17
Tunisien866-May-10 2:17 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Eddy Vluggen6-May-10 2:29
professionalEddy Vluggen6-May-10 2:29 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien866-May-10 3:40
Tunisien866-May-10 3:40 

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.