1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
HDécritConnexion("ConnexionSQLServeur", sLogin, sPWD, sNomServeur, sNomBase, "SQLOLEDB", hOLectureEcriture, "", hCurseurServeur + hCurseurOpenKeyset)
// Ouvrir la nouvelle connexion
SI PAS HOuvreConnexion("ConnexionSQLServeur") ALORS
Erreur("Impossible d'établir la connexion"+RC+ErreurInfo())
FIN
nOccurence=3
POUR nIndice=1 À nOccurence
SI PAS TABLE_IMPORT[nIndice][1]="" ALORS
sREQ ="INSERT INTO [mabase].[dbo].[matable] VALUES ('"+TABLE_IMPORT[nIndice][1]+"','"+TABLE_IMPORT[nIndice][2]+"','"+TABLE_IMPORT[nIndice][3]+"','"+TABLE_IMPORT[nIndice][4]+"','"+TABLE_IMPORT[nIndice][5]+"',"+TABLE_IMPORT[nIndice][6]+","+TABLE_IMPORT[nIndice][7]+","+TABLE_IMPORT[nIndice][8]+","+TABLE_IMPORT[nIndice][9]+","+TABLE_IMPORT[nIndice][10]+","+TABLE_IMPORT[nIndice][11]+","+TABLE_IMPORT[nIndice][12]+","+TABLE_IMPORT[nIndice][13]+","+TABLE_IMPORT[nIndice][14]+","+TABLE_IMPORT[nIndice][15]+","+TABLE_IMPORT[nIndice][16]+","+TABLE_IMPORT[nIndice][17]+",'"+TABLE_IMPORT[nIndice][18]+"','"+TABLE_IMPORT[nIndice][19]+"');"
SI PAS HExécuteRequêteSQL(sdREQ,"ConnexionSQLServeur",sREQ) ALORS
Erreur("erreur",HErreurInfo())
FIN
FIN
FIN
HAnnuleDéclaration(sdREQ) |
Partager