Bonjour

Je voudrai avoir de la documentation sur le javascript et le jdbc .

Pour le moment je me connecte sur l'AS400 avec :

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
 
 
var driver = "com.ibm.as400.access.AS400JDBCDriver";
var address = "jdbc:as400://144.164.165.10/medcpof"; 
var username = "invite"; 
var password = "invite"; 
var dbConn = DatabaseConnectionFactory.createDatabaseConnection(driver,address,username,password); 
//in my bridge table that is storing the kin for my patients, I need the patient ID to identify my patient 
var patientID = msg['PID']['PID.3']['PID.3.1']; 
 
//requete pour recuperer la langue primaire du patient
var query = "select clng from medcpof.sptml0 where pbmrn="+patientID;
var result = dbConn.executeCachedQuery(query);
 
if(result.next())
{
	msg['PID']['PID.15']['PID.15.1']=result.getString(1);  	
}
 
//simply closes the connection to the DB 
dbConn.close(); 
 
//finally you can return whatever you want to do with your filter. 
return true;
J'aurai juste besoin de documentation ou d'exemples supplémentaires .

Exemple je voudrai savoir le nombre d'enregistrement

D'avance merci