Hi all there,

Every time I use SQL in cooperation with the DataEnvironment in VB6, I have troubles. Need your help mostly:

I have created a connection in the DataEnvironment and by the SQL-builder i made the commandtext.

e.g.

DataEnvironmentname = DE
Connectionname = CRMDATABASE
Commandname = AllCust


The syntax of the sql =
SELECT KUNNR, NAME1, STRAS, PSTLZ, ORT01, LAND1, LOEVM FROM ZAN_KNA1 WHERE (NAME1 LIKE '"*" & `m_NAME` & "*"') AND (ORT01 LIKE '"*" & `m_CITY` & "*"') AND (LAND1 LIKE '"*" & [m_COUNTRY] & "*"')

As you see m_NAME, m_CITY and m_COUNTRY are variables, defined in the code. As you can also see, I use the * in front of
and behind the variable, so the user can type a few characters and the sql must populate the recordset

In code i use the next syntax for opening the recordset

DE.rsAllCust.open and the result is DE.rsAllCust.recordcount = 0

The problem is everytime, what do i use around the variables:
is that {} or [] or () or '' or "" or whatever???????

Help would be appreciated..


Ger