Hi,
this is my first try to delvelop an application for windows ce 5 with
c# (.net 2.0 + Visual Studio 2005). This application MUST work on
windows ce 5 !
This Application has to connect to a Sql Anywhere 10 Database which
runs on a Server in our LAN (WLAN is configured on the device and
works fine)
I used the sample-project "SimpleCE" which came with the SQL Anywhere-
Installation to make my first steps ;)
The application starts on the device but unfortunately I get an Error
when the application tries to connect to the DataBase (the line in the
code below, where the SAConnection is initialized.
The connectionstring works fine in our Windows-Applications.)
I cant catch the Error so it seems this is not an Error / Exception
from the CF.
>>>>Important<<<<<
This following code works on a PocketPC with Windows Mobile 5! But not
on windows ce 5!?!?!
######## Error-Message begin ########
Fatal Application Error
A security error of unknown cause has been detected which has
corrupted the program=B4s internal state.
The program cannot safely continue execution and must now be
terminated.
Program: SimpleCE.exe
######## Error-Message end ########
######## c# Code begin ########
private void btnConnect_Click(object sender, System.EventArgs e)
{
try
{
SAConnection conn =3D new SAConnection(
"UID=3DMYUSER;PWD=3DMYPW;servername=3DMYDBSERVERNAME;commlinks=3Dtcpi=
p");
try
{
conn.Open();
SACommand cmd =3D new SACommand("select name1 from dba.Employee",
conn);
SADataReader reader =3D cmd.ExecuteReader();
while (reader.Read())
{
listEmployees.Items.Add(reader.GetString(0));
}
reader.Close();
conn.Close();
}
catch (SAException ex)
{
MessageBox.Show(ex.Errors[0].Message);
}
}
catch (System.Exception err)
{
MessageBox.Show(err.Message + "\n" + err.StackTrace);
}
}
######## c# Code end ########
So do anyone know what I am doing wrong?
Do I have to change some settings in Windows Ce? If yes, which
settings (I didnt found any securitysettings until now)?
I have two devices:
>>>>>Dont work
Handheld Products Dolphin 7600
Windows Ce 5.00
WLAN: Cisco Systems AEGIS Client Version 2.1.19 Build 0
>>>>>Works fine
HTC TyTn
Windows Mobile 5
CompactFramework .net 2.0 installed
thanks for help.
Marcel