Solved

Visual Studio Smart Device application will not connect to specified server

Posted on 2008-10-16
4
1,252 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

749 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