how to Select variable range using OleDbCommand
Hi
Users can select a range 50 to 600 in a chart panel. Currently I m using:
Code:
Dim myCommand As New OleDbCommand("Select * From [Delay$h1:u601]", myConnection)
But I want the "u601" to be a variable based on what the user selects. That way when i read the data in it will already be the reduced size for the chart graph. I searched and some use {} but that doesnt to work for me.
Can someone give me a variable based to select data from the Delay excel sheet starting at h1 please?
Thanks.
Re: how to Select variable range using OleDbCommand
Obviously you need a WHERE clause if you want to filter the data. You just need to use one or more parameters if you want the filter values to be variable. Follow the Blog link in my signature below and check out my post on Parameters In ADO.NET to learn how to do that.