How to connect SQL Server From Pocket PC Device

Dear members

I want to connect SQL Server database from pocket pc device

but it gives an error than "Either the sql database does not exist or access denied

My Code is

SqlConnection conn=new SqlConnection("Data Source=OurServer;initial catalog=Resident;user id = sa;password = sa);

conn.Open();

If anybody knows the problem please send some information

Regards

Bijaya




Answer this question

How to connect SQL Server From Pocket PC Device

  • Andrew

    This blog is a great source for connection troubleshooting tips:
    http://blogs.msdn.com/sql_protocols

    In this case if SQL Server 2005 is running on Windows XP SP2 then you may need to add an exception to the Windows firewall for the service. The blog goes into detail on exactly how to accomplish this.

    Hope this helps.



  • kReynolds

    The error suggests that connectivity doesn't exist between the pocket pc device and SQL or that the server isn't running/listening on the desired protocol.

    Does the same code run successfully on a desktop PC If so try verifing that the pocket pc has network connectivity and access to the SQL machine.

    Hope this helps.



  • Nehal Jain

    Thanks for reply

    Now the above code can connect SQL Server 2003 installed in Windows 2000 professional machine.But it can not connect to the SQL Server installed in Windows XP machine.

    what is the problem behind it.Please give some information

    Regards Bijaya



  • How to connect SQL Server From Pocket PC Device