by Matt Hawrysko (2 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 18th March 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Passing a string variable to the SQL WHERE Statement and fills a ListBox with the data retrieved. It is a good idea to clear the contents of
' through an ODBC driver.
nameRS.Open _
("SELECT CUST_ORDER_NO, DELIVERY_DATE FROM CUST_ORD_HDR WHERE CUST_NO='" & tempCUSTnumber & "' ORDER BY DELIVERY_DATE")
' I don't know if anyone else has had trouble figuring out the
' SQL syntax in VB6.
Screen.MousePointer = vbHourglass
' Build the array for the listbox.
ReDim arrayActualOrder(0)
Do Until nameRS.EOF
Screen.MousePointer = vbHourglass
arrayActualOrder(i) = nameRS!CUST_ORDER_NO
' myODBCList2 is a ListBox on the Main Form
myODBCList2.AddItem arrayActualOrder(i)
ReDim Preserve arrayActualOrder(UBound(arrayActualOrder) + 1)
nameRS.MoveNext
i = i + 1
Loop
Screen.MousePointer = vbDefault
End If
No comments have been posted about Passing a string variable to the SQL WHERE Statement and fills a ListBox with the data retrieved. I. Why not be the first to post a comment about Passing a string variable to the SQL WHERE Statement and fills a ListBox with the data retrieved. I.