>Hi Dragan,
>
>My apologies if my previous reply has offended you in any way.
Accepted - we all need a bit of patience here :).
>All I want to say that the whole program works if I use user DSN but fails when I go for SQLStringConnect.
Now this is confusing. In message #
1270660 you say
"I have corrected the problem by updating the variable mySQLCn to
1. mySQLCn = "driver=MySQL ODBC 3.51 Driver;server=192.168.2.2;uid=####;pwd=##;database=###"
However the problem is still there."
...so you corrected the problem and the problem is still there. This is not clear - either the problem is corrected or it is not or we have more than one problem. You also say elsewhere "No luck with AERROR() either. It stores the same message - Alias not found." That may happen if you tried it after Select... try this:
lnResult = SQLEXEC(lha, lcQry, 'cmpData')
if lnResult<0
aerror(aE)
wait window aE[2]
endif
SELECT cmpData
Now aE should contain the ODBC error. If there was such an error, the cursor cmpData was not created, the last line raises a new error - "Alias not found" - and we lose the way to diagnose the first error. So it's crucial to check it immediately.
BTW, I'm still confused about the u. and l. alias in your SQL, but if you say it worked at some point, then I'll assume there were other tables as well, and one of them had the alias u.