Cor .
I understand you have quite experience vb.net and want to help me solve. I'm
appreicate for your help first.
However, the problem is not very simple as you think. Right now I clarify my
requirement.
Given the table as "Customer",
In table "Customer", there have one column name
"CustomerName"
The table customer show as follow :
CustomerName
_______________
Able
Adware
Catherine
Cathy
Don
Donny
In vb6, I do the follow code which can allow me to create quick list
function
Dim rCustomer as recordset
rCustomer = new recordset
rCustomer.open ("select CustomerName from Customer" , sqlCnn)
set datagrid1.datasource = rCustomer
private sub SrhText_OnChange()
rCustomer.find "CustomerName >= '" & SrhText.Text & "'"
end sub
as a result , I type "Ca" , the cursor will go to 3rd row.
when I type "D", the cursor will go to 5th row.
In this case. vb.net find or findrow must fufill my requirement (or solve my
problem) since. Ca cannot find in the table. (i.e. "D" also cannot find) It
must return integer -1. (Mean no find).
In your second propose. You ask me use select method. However. Cor. select
method is a filter method or a find method. if you tell me use this method.
It is equal covert it into vb6 as follow :
Dim rCustomer as recordset
rCustomer = new recordset
rCustomer.open ("select CustomerName from Customer" , sqlCnn)
set datagrid1.datasource = rCustomer
private sub SrhText_OnChange()
rCustomer.filter = "CustomerName >= '" & SrhText.Text & "'"
end sub
Then when I type "Ca", the data
Able
Adware
will disappear unless I clear all word.
Finally, I just ado.net have method which return integer and move cursor
when I partical input. I know when to select, when to use find / findrow
metod.
find / findrow is move cursor, while select is use for filtering.
Cor. (expert vb.net developer) pls help me as vb.net beginner
or if you think I still stuck in somewhere. Please give me the sample code
base on above scenario.
Since I still evaluate feasibility between vb6 and vb.net
Thanks