Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Cetin Basoz
 To: Syed Imran Ulhaq
  Where is Syed Imran Ulhaq?
 Saudi Arabia
 Syed Imran Ulhaq
Subject: RE: DNS less connection
Thread ID: 393889 Message ID: 393891 # Views: 61 # Ratings: 0
Version: Visual FoxPro 9 Category: ODBC, ADO and OLEDB
Date: Wednesday, December 25, 2013 10:47:16 AM         

> hello and Christmas greetings to all
> i need to setup dns less connection in my application developed in VFP 9 and MySQL.
> at client machine MySQL ODBC driver 5.1 installed and right now odbc connections created at client machine.
> I want to remove them and connect without ODBC connections,
> from mysql site i applied below code but it is opening the mysql connection dialogue box, any idea how to remove this box and connect without prompt
> to user.
> *!* ConnectionString = "DRIVER={MySQL ODBC 5.1 Driver};\;
> *!* SERVER=server ip;\;
> *!* USER=uname;\;
> *!* PASSWORD=upassword;\;
> *!* PORT=3306;\;
> *!* OPTION=3;"
> *!* lnConnHandle=SQLSTRINGCONNECT(m.ConnectionString)
> regards,
> Imran

I believe it is because of the peculiar way that you're writing your connection string. The connection string wouldn't accept those back slashes in it and wouldn't understand the string as a whole (and BTW doing this you are doing a DSNless connection but still it is an ODBC connection):

ConnectionString = "DRIVER={MySQL ODBC 5.1 Driver};"+;
                   "SERVER=server ip;"+;

Cetin Basoz

Give some sample data in code for your question - here is the tool you need to generate the code

My Blog

MongoDb Certified Developer
MongoDb Certified DBA

Support Wikipedia


DNS less connection Posted by Syed Imran Ulhaq @ 12/25/2013 9:46:03 AM
RE: DNS less connection Posted by Cetin Basoz @ 12/25/2013 10:47:16 AM