Solved

Visual Studio Smart Device application will not connect to specified server

Posted on 2008-10-16
4
1,249 Views
Last Modified: 2013-11-27
I'm new to Visual Studio.  I have a inventory form intended for a handheld computer that will connect to the server SQL database via wireless.  Although the database shows in the explorer and server windows and I can preview data, when I run debug the the application will not connect to the database.  Here's my VB code for the connection string.  Thank you in advance for your help, it's greatly appreciated.
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute()>  _

        Private Sub InitConnection()

            Me._connection = New Global.System.Data.SqlClient.SqlConnection

            Me._connection.ConnectionString = "data source=DC1; user id=xx; pwd=xxxxx; initial catalog=Jeff;database=Jeff; Integrated Security=True;"

        End Sub

Open in new window

0
Comment
Question by:jeff-h
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:GaryHoff
ID: 22883983
I am having a similar problem.  I get an sqlexception number 6, with no useful message (compact framework limitation I suppose)
0
 
LVL 1

Accepted Solution

by:
GaryHoff earned 500 total points
ID: 22884316
I solved my problem.  See http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx.
In my case in the SQL Configuration Manager -> SQL Server 2005 Services, the SQL Server Browser was not running.
0
 

Author Comment

by:jeff-h
ID: 22899399
Thanks, it worked!
0
 

Author Closing Comment

by:jeff-h
ID: 31506937
Thanks a lot!  I've been stuck on that for a week.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now