Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC connection
Message
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:
01270658
Views:
21
Hi Abhishek,
Ad second example.. Where you specify database?
MartinaJ

>Hello Everybody,
>
>I am trying to retrieve data from MySQL database. I was using the following method till now.
>1. Create a user DSN ('mySqlODBC')
>2. lha = sqlConnect('mySqlODBC')
>3. lcQry = "Select u.userid Id, concat(u.firstname, ' ', u.lastname) Name, from loans as l "
>4. lnResult = SQLEXEC(lha, lcQry, 'cmpData')
>5. SELECT cmpData
>
>I was trying to get rid of the process to create user DSN, hence tried the following
>1. mySQLCn = "driver=MySQL ODBC 3.51 Driver;server=192.168.2.2;uid=####;pwd=##"
>2. lha = SQLSTRINGCONNECT(mySQLCn,.T.)
>3. lcQry = "Select u.userid Id, concat(u.firstname, ' ', u.lastname) Name, from loans as l "
>4. lnResult = SQLEXEC(lha, lcQry, 'cmpData')
>5. SELECT cmpData
>However now I get the error "cursor cmpData not found". It looks like that SQLEXEC is failing.
>
>Is there anything wrong I am doing ? Kindly suggest.
>
>Many thanks in advance,
>Abhi
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform