Conrado Natac
New Member
Hi Conrado ,
You are right. When in doubt , always try with literal values instead of parameters ; when you use parameters , the SQL string should be the same as when you use literals.
Thus , when you try in your specific case , the normal SQL string would be :
SELECT * FROM [data$] WHERE [data$].[Type] = 'I' and [data$].[Cust #]='GL 888'
Now , when you use parameters , you should see that your strSQL after its assignment is identical to the above. Only then will your query work correctly.
Since the variable xtype contains the character I , the single quotes on either side have to be added. Similarly for the variable cmbcustno.Text
Narayan
Thanks for the the clarification. It certainly help me as a novice. Now, I understand where you are coming from.
Wow, I am learning more from just reading here and using your aadvice.
Thanks