Ok - I create a SDF in VS2005 - copied it to the PPC and now I am trying to run this code - deploying it to the PPC - app starts and I can click the FIND button...
Seems to be getting this error:VB Code:
Imports System.Data.SqlServerCe Public Class StuMobile Private Dcn As SqlCeConnection Private Drc As SqlCeCommand Private Drs As SqlCeResultSet Private Drd As SqlCeDataReader Private Sub Find_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Find.Click Drc = New SqlCeCommand Drc.Connection = Dcn Drc.CommandType = Data.CommandType.Text Drc.CommandText = "Select * From Student Where LastName like '" & Find.Text & "%'" Drd = Drc.ExecuteReader Results.Clear() While Drd.Read Results.Items.Add(Drd(1)) End While End Sub Private Sub StuMobile_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dcn = New SqlCeConnection Dcn.ConnectionString = "Data Source=\My Documents\Business\iPAQ.sdf; Password=xyz" Dcn.Open() End Sub End Class
I'm just doing a quick proof of concept - thought this would work.A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Should I not be copying the SDF to the PPC?




Reply With Quote