S
Steve Bishop
I using a text box on my form to enter search criteria. How would I get
a subset of records based on the first 3 characters the user types. In
SQL, I can use "Like field%". I'm having trouble using something like
this with the variable in my code. Help appreciated. Thanks:
public function GetCustomers(byval CustomerName as string) as dataset
dim strconn as string
dim sqlstring as string
dim myconn as OdbcConnection
dim myadap as OdbcDataAdapter
dim ds as new dataset()
strconn = "dsn=SOTAMAS90AUTO;uid=sys;pwd=Huey;"
sqlstring = "Select Division, CustomerNumber, CustomerName,
AddressLine1 FROM AR1_CustomerMaster"
sqlstring += " where CustomerName = '" + CustomerName +"'"
a subset of records based on the first 3 characters the user types. In
SQL, I can use "Like field%". I'm having trouble using something like
this with the variable in my code. Help appreciated. Thanks:
public function GetCustomers(byval CustomerName as string) as dataset
dim strconn as string
dim sqlstring as string
dim myconn as OdbcConnection
dim myadap as OdbcDataAdapter
dim ds as new dataset()
strconn = "dsn=SOTAMAS90AUTO;uid=sys;pwd=Huey;"
sqlstring = "Select Division, CustomerNumber, CustomerName,
AddressLine1 FROM AR1_CustomerMaster"
sqlstring += " where CustomerName = '" + CustomerName +"'"