bonjour @ tous.
J'en vois déja tout rouge disant : MAIS T' AS PAS CHERCHE ?
Bah si mais cela ne semble pas marcher . . . enfin fonctionner.
Donc je developpe une application qui va fonctionner sous Win XP et sous pocket pc (en adaptant les fenetres et tout le tralala mais la n'est pas la question).
J'ai donc installé SQL serveur 2005 sur le pocket pc ainsi qu'un JDK supportant pas mal de fonctions java.
En allant sur des fofos, des solutions comme ca on été donné :
Les erreurs sont multiples :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 using System.Data; using System.Data.SqlServerCe; public class test3 { public static String connectionString = ""; public static SqlCeConnection cn = null; public static SqlCeDataAdapter da = null; public static DataTable dt = new DataTable(); public static void main(String[] args) { connectionString = "Data Source=\\My Documents\\ais.sdf" ; cn = new SqlCeConnection(connectionString); da = new SqlCeDataAdapter("SELECT * FROM Client", cn); da.Fill(dt); foreach (DataRow dr in dt.Rows) { System.Console.WriteLine(dr[0]); } } }
La plus récurrente sur tous mes tests est :Exception in thread "main" java.lang.Error: Unresolved compilation problems:
cn cannot be resolved
SqlCeConnection cannot be resolved to a type
da cannot be resolved
SqlCeDataAdapter cannot be resolved to a type
cn cannot be resolved
da cannot be resolved
dt cannot be resolved
Syntax error, insert ")" to complete MethodInvocation
Syntax error, insert ";" to complete Statement
DataRow cannot be resolved
Syntax error on token "in", ( expected
dt cannot be resolved
Syntax error, insert ";" to complete Statement
System.Console cannot be resolved
dr cannot be resolved
at test3.main(test3.java:15)
Mon appli est faite en java, testée sur le pocket pc mais sans succès . . .SqlCeConnection cannot be resolved to a type
Merci
Partager