Solved

Visual Studio Smart Device application will not connect to specified server

Posted on 2008-10-16
4
1,255 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

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.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Viewers will learn how the fundamental information of how to create a table.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

729 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