Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Specifying the table name
Message
De
31/01/2006 16:34:08
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Specifying the table name
Divers
Thread ID:
01092068
Message ID:
01092068
Vues:
56
In the following function, I cannot define the name of the table I wish to have in the data adapter fill command. The second parameter is not available. However, wherever I look on the net, everyone is able to pass a second parameter to the data adapter fill command.
    ' SQL exec
    ' expC1 SQL command
    ' expO1 Connection
    Public Function SQLExec(ByVal tcSQL As String, ByVal tcConnection As String) As Boolean
        InitializeDataObject(nSQLMode, tcConnection, tcSQL)
        Dim llSuccess As Boolean
        llSuccess = False
        Try
            oCommand.Connection = oConnection
            oCommand.CommandText = tcSQL

            ' Only add the parameters if we have some
            If Not oParameters2 Is Nothing Then
                For Each oDataParameter In oParameters2
                    oCommand.Parameters.Add(oDataParameter)
                Next
            End If

            oDataAdapter.SelectCommand = oCommand
            oDataSet = New DataSet

            ' By default, .NET does not add the specific field length, which is needed in XML as at the other end
            ' someone would always get memo field instead of character field
            oDataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey

            oDataAdapter.Fill(oDataSet)
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform