I have an MSDE database on a server "RWPSRV1", and an Access project on several clients to track loaner cars. I am attempting to create a PDA based return form using Visual Studio.Net. The server will be accessed via a wireless network (not web based). I am using the built-in Pocket PC emulator that comes with VS.net. for the test -- not an actual PPC. I have a Symbol PPT8800 that I can use if necessary
The problem I am having is connecting to the MSDE SQL server. Below is the code to a simple form I created to test connectivity with several Dim statements I tried. I included all the code but the coonection attempts start near the end at "Try". Mostly, the trapped messages state that the path is wrong or the server does not exist. The first Dim statement works fine (connects) in a windows application form in VS.net -- but not the Smart Application
Can someone point out the error(s) of my ways
Is it possible that the emulator does not "connect" but the Symbol (or other PPPC) would
Imports System.Data.SqlClien
Imports System.Data.SqlServerC
Public Class Form
Inherits System.Windows.Forms.For
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMen
#Region " Windows Form Designer generated code
Public Sub New(
MyBase.New(
'This call is required by the Windows Form Designer
InitializeComponent(
'Add any initialization after the InitializeComponent() cal
End Su
'Form overrides dispose to clean up the component list
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean
MyBase.Dispose(disposing
End Su
'NOTE: The following procedure is required by the Windows Form Designe
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor
Private Sub InitializeComponent(
Me.MainMenu1 = New System.Windows.Forms.MainMen
'Form
Me.Menu = Me.MainMenu
Me.Text = "Form1
End Su
#End Regio
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
Try
Dim conn As New SqlConnection("server=RWPSRV1;uid=sa;database=CV4a01SQL"
'Dim conn As New SqlConnection("server=RWPSRV1;uid=sa;password=;database=CV4a01SQL"
'Dim conn As SqlCeConnection
'Dim DataPath As Strin
'DataPath = "RWPSRV1\CV4a01SQL
'conn = New SqlCeConnection("Data Source=" & DataPath
'Dim conn As New SqlCeConnection
'conn.ConnectionString = "Persist Security Info=False; Data Source = \\RWPSRV1\d$\MSDEData\CV4a01SQL" +
'"Password =
'Dim conn As New SqlCeConnectio
'conn.ConnectionString = "Data Source = RWPSRV1\d$\MSDEData\CV4a01SQL.mdf
'Dim conn As SqlServerCe.SqlCeConnectio
'conn.ConnectionString = "server=RWPSRV1;uid=sa;database=ADP_Records2
conn.Open(
If (conn.State = ConnectionState.Open) The
MessageBox.Show("Connection opened successfully"
End I
conn.Close(
Catch ex As SqlException 'SqlCeException - use this when testing CE string
MessageBox.Show(ex.Message
End Tr
End Su
End Clas
Thanks for any help you could provide