Link to home
Start Free TrialLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

put the data in order with this statement

I want to put this data in order by name in vb6.  How do I do this?

esql = "select * From frmRegistrationCSW Where frmRegistrationCSWCheck3 = 1 And frmRegistrationCSWCheck10 =1 And frmRegistrationCSWText15  >= convert( datetime, " & ravi & BeginDate & ravi & " , 101 )And frmRegistrationCSWText15  <= convert( datetime, " & ravi & EndDate & ravi & " , 101 ) "
Avatar of imitchie
imitchie
Flag of New Zealand image

esql = "select * From frmRegistrationCSW Where frmRegistrationCSWCheck3 = 1 And frmRegistrationCSWCheck10 =1 And frmRegistrationCSWText15  >= convert( datetime, " & ravi & BeginDate & ravi & " , 101 )And frmRegistrationCSWText15  <= convert( datetime, " & ravi & EndDate & ravi & " , 101 ) ORDER BY NAME"
Avatar of al4629740

ASKER

I get an error by the "And statement"
interesting, you had an error in the original SQL

esql = "select * From frmRegistrationCSW Where frmRegistrationCSWCheck3 = 1 And frmRegistrationCSWCheck10 =1 And frmRegistrationCSWText15  >= convert( datetime, " & ravi & BeginDate & ravi & " , 101) And frmRegistrationCSWText15  <= convert( datetime, " & ravi & EndDate & ravi & " , 101 ) ORDER BY NAME"
Avatar of Shanmuga Sundaram D
If not try like this
esql = "select * From frmRegistrationCSW Where (frmRegistrationCSWCheck3 = 1 And frmRegistrationCSWCheck10 =1) And (frmRegistrationCSWText15  >= convert( datetime, " & ravi & BeginDate & ravi & " , 101) And frmRegistrationCSWText15  <= convert( datetime, " & ravi & EndDate & ravi & " , 101 )) ORDER BY NAME"
There was no error in the original SQL.
ASKER CERTIFIED SOLUTION
Avatar of imitchie
imitchie
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial