Community discussion forum

How to get the value from SQL string??

  • 3 months ago

    Hi,

    I want to get the value from SQl string .Please let me know

     

    Public
    Shared Sub SQLExecute(ByVal strSQL As String)

    Dim Conn As New SqlConnection(getConnectionString)

    Dim cmd As New SqlCommand(strSQL, Conn)With cmd

    .Connection.Open()

    .ExecuteNonQuery()

    .Connection.Close()

    .Dispose()

    End With

    End Sub

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 3 months ago

     

    Hello,

    You can try using the concept of the DataReader. This allows you to loop through the rows and retrieve a value

    for the individual columns. You can try visit the given web link. This wiill give you a fair idea on the implementation

    of DataReader.

    http://www.startvbdotnet.com/ado/sqlserver.aspx

    I hope this will assist you.

    Regards,

    Allen Smith

    ComponentOne LLC

    www.componentone.com

Post a reply

Enter your message below

Sign in or Join us (it's free).