Problem in Connecting to my desktop SQL Server 2000 from Pocket PC 2000

V

venkateswarag

Hi,

I am trying to connect SQL Server 2000 from Pocket PC emulator using
"Smart Device Applications".

I am keep getting the error "SQL Server does not exist or access denied
"

code snippet as follows

SqlConnection consql2000 = new SqlConnection("User
ID=sa;Password=xxxx;Initial Catalog=DotNetCF;Data Source=taknev;");

SqlCommand cmd = new SqlCommand("SELECT * FROM test", consql2000);
SqlDataReader dr;
try
{
consql2000.Open();
dr = cmd.ExecuteReader();
while (dr.Read())
{
listBox1.Items.Add(dr.GetString(1));
}
dr.Close();
consql2000.Close();
}
catch (SqlException ex)
{
MessageBox.Show(ex.Message);
}

Any help??? Thanks in advance

-Venki
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top