2
Answers

Dynamic Define Parameters in MySql Command

Ask a question
I have one file (database.vb) where i have mention a function like - 

Public Sub Execute(ByVal SP As String)
        Dim QueryConnection As New OdbcConnection(ConfigurationManager.ConnectionStrings("DBConnection").ToString)
        QueryConnection.Open()
        Dim cmd As New OdbcCommand(SP, QueryConnection)

cmd.Parameters.Add(---------------------------)
        cmd.ExecuteNonQuery()
        QueryConnection.Close()
    End Sub

/* in place of query i want to use stored procedure(SP)

this function i am going to use for insert data but i am facing problem with declaring parameters.
how i will declare parameters here because there will be different parameters and it will dynamically ?





Answers (2)