Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC connection
Message
From
22/11/2007 10:12:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
22/11/2007 09:58:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MySQL
Miscellaneous
Thread ID:
01270657
Message ID:
01270683
Views:
28
>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform