Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    9

    Unanswered: Pocket PC is not connection to MSDE database

    I want to connect a MSDE database exists in the desktop from Pocket pc 2003 application developed using vb.net. It is giving sql server not found error. It is working in the pocket pc simulater. But it is not working in the pocket pc device. Connection is also working sql server 2000 database. Please help me.

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Want to show us the connection string?

    Might help...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Nov 2003
    Posts
    9

    Here is the connection string

    cs = "data source=mypc\test;initial catalog=test;user id=sa;persist security info=False;workstation id=mypc\test;packet size=4096"

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    It's not listed here (and you should post the actual one) but are you supplying a password?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Nov 2003
    Posts
    9
    Originally posted by Brett Kaiser
    It's not listed here (and you should post the actual one) but are you supplying a password?
    Not supplying the password
    I am not supplying the password. I have used the following entries in the setup.ini file while installing the MSDE
    [Options]
    INSTANCENAME=TEST
    SECURITYMODE=SQL
    BLANKSAPWD=1

    I think i no need a password here. I have also tried with password it is giving same problem. here the code...
    Dim cnfordesktop As New System.Data.SqlClient.SqlConnection

    '--------------------------------------------------------------------------
    ' Open the desktop connection
    '--------------------------------------------------------------------------
    Public Function OpenConnectionForDeskTop() As Boolean
    Dim cnstr As String = ConnectionStringForDeskTop()
    Try
    cnfordesktop = New system.Data.SqlClient.SqlConnection(cnstr)
    cnfordesktop.Open()
    Catch e As SqlClient.SqlException
    MessageBox.Show("Error Number: " & e.Number & ", Error Message: " & e.Message & ", Command: " & cnstr, "Database ", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1)
    Return False
    End Try
    Return True
    End Function
    '--------------------------------------------------------------------------
    'close the connection
    '--------------------------------------------------------------------------
    Public Sub CloseConnectionForDesktopVM()
    Try
    cnfordesktop.Close()
    Catch ex As Exception

    End Try
    End Sub
    '--------------------------------------------------------------------------
    'Set the connection string property
    '--------------------------------------------------------------------------
    Public Function ConnectionStringForDeskTop() As String
    Dim cs As String = ""
    cs = "data source=mypc\test;initial catalog=test;user id=sa;password=;persist security info=False;"
    Return cs
    End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •