Resumen Modificar una consulta desde VB con ADO

Mensaje enviado por "L.M.Santin" <santin@cubaturv.cbt.tur.cu>

Hola Colegas,
Por si hay alguien mas interesado en el tema, me parece haber encontrado la solucion en el MSDN. Buscando catalog and ADOX encontre lo siguiente:

Procedure Text Example


The following code demonstrates how to use the Command property to update the text of a procedure.

Sub ProcedureText()

    Dim cnn As New ADODB.Connection
    Dim cat As New ADOX.Catalog
    Dim cmd As New ADODB.Command

    ' Open the Connection
    cnn.Open _
        "Provider=Microsoft.Jet.OLEDB.4.0;" & _
        "Data Source=c:\Program Files\Microsoft Office\" & _
        "Office\Samples\Northwind.mdb;"

    ' Open the catalog
    Set cat.ActiveConnection = cnn

    ' Get the Command
    Set cmd = cat.Procedures("CustomerById").Command

    ' Update the CommandText
    cmd.CommandText = "Select CustomerId, CompanyName, ContactName " & _
        "From Customers " & _
        "Where CustomerId = [CustId]"

    ' Update the Procedure
    Set cat.Procedures("CustomerById").Command = cmd

End Sub

Esto actualiza las consultas en las MDB.

saludos



Resumen Resumen

Visual Basic Página de Visual Basic

Página principal Página principal

www.jrubi.com