Hi guys!!

Im new at this wonderful world, im triying to connect a pocket pc to a sql
express server, but i cant do it =(
And when i try to connect to a sql 2000 standar it was successful, is it a
limitation of sql express? or there is specifit way to do it?

in my code i use this connection string an it works with pocket pc

SqlConnection cnn = new SqlConnection("Data Source=192.168.1.40;Initial
Catalog=mydb;User ID=sa;Packet Size=4096;Password=123");

SqlCommand cmd = new SqlCommand();

SqlDataReader rdr;

cmd.Connection = cnn;

cmd.CommandText = "select * from arearesp";

cnn.Open();

rdr = cmd.ExecuteReader();

while (rdr.Read())

{

comboBox1.Items.Add(rdr["ds_arearesp"].ToString());

}

rdr.Close();

cnn.Close();



using C# and this connection string works but using windows

SqlConnection cnn = new SqlConnection("Data
Source=192.168.1.40\\sqlexpress;Initial Catalog=mydb;User ID=sa;Packet
Size=4096;Password=123");

i've tried it with pocket pc but when try to open connection it fails i got
an error

Regards.

Rick.

Re: newbie problem with sql express by Peter

Peter
Sat Oct 21 07:45:30 CDT 2006

The issue is probably that either you don't have the TCP transport enabled
in SQL Express - by default this is disabled. Or you may have a firewall or
similar blocking the port used.

Peter

--
Peter Foot
Device Application Development MVP
www.peterfoot.net | www.inthehand.com

"Rick" <elmargaro@hotmail.com> wrote in message
news:eT$HGEH9GHA.3348@TK2MSFTNGP03.phx.gbl...
> Hi guys!!
>
> Im new at this wonderful world, im triying to connect a pocket pc to a sql
> express server, but i cant do it =(
> And when i try to connect to a sql 2000 standar it was successful, is it a
> limitation of sql express? or there is specifit way to do it?
>
> in my code i use this connection string an it works with pocket pc
>
> SqlConnection cnn = new SqlConnection("Data Source=192.168.1.40;Initial
> Catalog=mydb;User ID=sa;Packet Size=4096;Password=123");
>
> SqlCommand cmd = new SqlCommand();
>
> SqlDataReader rdr;
>
> cmd.Connection = cnn;
>
> cmd.CommandText = "select * from arearesp";
>
> cnn.Open();
>
> rdr = cmd.ExecuteReader();
>
> while (rdr.Read())
>
> {
>
> comboBox1.Items.Add(rdr["ds_arearesp"].ToString());
>
> }
>
> rdr.Close();
>
> cnn.Close();
>
>
>
> using C# and this connection string works but using windows
>
> SqlConnection cnn = new SqlConnection("Data
> Source=192.168.1.40\\sqlexpress;Initial Catalog=mydb;User ID=sa;Packet
> Size=4096;Password=123");
>
> i've tried it with pocket pc but when try to open connection it fails i
> got an error
>
> Regards.
>
> Rick.
>
>
>
>


Re: newbie problem with sql express by Rick

Rick
Mon Oct 23 08:38:00 CDT 2006

Hi Peter, i have enabled TCP option, i think is other reason =(
is there a limitation by using SQL Express? or this is not limitation?
another idea?

Regards.
Rick

"Peter Foot [MVP]" <feedback@nospam-inthehand.com> escribió en el mensaje
news:5228CA89-16BC-4EFD-8C96-791E071FB9BC@microsoft.com...
> The issue is probably that either you don't have the TCP transport enabled
> in SQL Express - by default this is disabled. Or you may have a firewall
> or similar blocking the port used.
>
> Peter
>
> --
> Peter Foot
> Device Application Development MVP
> www.peterfoot.net | www.inthehand.com
>
> "Rick" <elmargaro@hotmail.com> wrote in message
> news:eT$HGEH9GHA.3348@TK2MSFTNGP03.phx.gbl...
>> Hi guys!!
>>
>> Im new at this wonderful world, im triying to connect a pocket pc to a
>> sql express server, but i cant do it =(
>> And when i try to connect to a sql 2000 standar it was successful, is it
>> a limitation of sql express? or there is specifit way to do it?
>>
>> in my code i use this connection string an it works with pocket pc
>>
>> SqlConnection cnn = new SqlConnection("Data Source=192.168.1.40;Initial
>> Catalog=mydb;User ID=sa;Packet Size=4096;Password=123");
>>
>> SqlCommand cmd = new SqlCommand();
>>
>> SqlDataReader rdr;
>>
>> cmd.Connection = cnn;
>>
>> cmd.CommandText = "select * from arearesp";
>>
>> cnn.Open();
>>
>> rdr = cmd.ExecuteReader();
>>
>> while (rdr.Read())
>>
>> {
>>
>> comboBox1.Items.Add(rdr["ds_arearesp"].ToString());
>>
>> }
>>
>> rdr.Close();
>>
>> cnn.Close();
>>
>>
>>
>> using C# and this connection string works but using windows
>>
>> SqlConnection cnn = new SqlConnection("Data
>> Source=192.168.1.40\\sqlexpress;Initial Catalog=mydb;User ID=sa;Packet
>> Size=4096;Password=123");
>>
>> i've tried it with pocket pc but when try to open connection it fails i
>> got an error
>>
>> Regards.
>>
>> Rick.
>>
>>
>>
>>
>
>