Bonjour,
J'ai un recordset dont je souhaite vérifier s'il retourne des résultats ou non.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Dim maConnexion as Object
dim SQLInfoAbs,ValeurAbs as string
SQLInfoAbs="SELECT * FROM ""Table"" WHERE ""Table"".""Champ"" IS NULL )"
oContext = createUnoService("com.sun.star.sdb.DatabaseContext")
NomSource= "Base" ' nom de la base
oSource = oContext.GetByName(NomSource)
oConnexion = oSource.getconnection("","")
oStatement = oConnexion.CreateStatement()
oDonnees = oStatement.executeQuery(SQLValAbs)
If Not IsNull(oDonnees) Then
oDonnees.next
ValeurAbs = oDonnees.getColumns().getByName("NomChamp").getString()
msgbox "il existe des champs non renseignés"
oRapports = ThisDataBaseDocument.ReportDocuments.getByName("Etat infos manquantes").open()
End If |
Mais la condition
If Not IsNull(oDonnees) Then
n'a pas l'air d'être au point....
Quelqu'un saurait-il pourquoi ?
Merci
Partager