Problème avec tableau() string
Bonjour,
Voilà je viens de regarder Entrerpise Library. Mais j'ai un problème.
La définition qui me pose problème:
Citation:
Public Overridable Sub LoadDataSet(ByVal commandType As System.Data.CommandType, ByVal commandText As String, ByVal dataSet As System.Data.DataSet, ByVal tableNames() As String)
Membre de : Microsoft.Practices.EnterpriseLibrary.Data.Database
Résumé :
Loads a System.Data.DataSet from command text.
Paramètres :
# commandType:
One of the System.Data.CommandType values.
# commandText:
The command text to execute.
# dataSet:
The System.Data.DataSet to fill.
# tableNames:
An array of table name mappings for the System.Data.DataSet.
Mon code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Dim bdd As Database = Nothing
Try
bdd = DatabaseFactory.CreateDatabase("Parc_Véhicule.My.MySettings.LocalDbServer")
'Requete
Dim query As String = "SELECT * FROM Tbl_Energie"
'Execution de la requete et affichage des résultats
objdataset = bdd.LoadDataSet(CommandType.Text, query, objdataset, "TblEnergie")
Catch ex As Exception
MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Stop)
End Try |
:oops: :oops: :oops:
Je ne sais pas comment faire pour mettre le nom de la table. Il attend un tableau ?
Citation:
# tableNames:
An array of table name mappings for the System.Data.DataSet.
:oops: :oops: :oops:
J4ai fait des recherches sur le net pour trouver des exemples, mais sans succès.
Un grand merci d'avance.
:oops: Gdal :oops: