Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote View to MySQL database
Message
From
06/10/2008 03:29:45
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01352722
Message ID:
01352921
Views:
26
>Hi Victor,
>
>Yes, from what I have able to determine thus far, it does seem as if MySQL is performing a query on the backend. With that in mind I tried setting the the view's parameter to a value that would quickly hit the index and result in no matching records, however that did change anything so while a select seems to be occurring it appears that the parameter of the view has nothing to do with it.
>
>I had considered not destroying the DBC that holds the views, when the user exits the app, so that I only pay the penalty for the delay creating those views once, but that leaves behind a container file that can be examined to reveal user logins and passwords etc.
>
>It would seem that there must be a solution to this, somewhere......??????
>
>Alec

If you are going thru all this trouble just to hide the connection data, then you are doing too much work. How are you storing that information to create the view on the fly anyway?

I do it this way:

Just create a dbc, create the views, set all the remote views to share the same connection (Query, advanced options, share connection or set "ShareConnection" to .T. for the view.

Save the connection parameters anyway you like: registry, ini file, xml, etc. then at program startup:
*!* not complete code here

m.lcOdbcDriver 		= "{MySQL ODBC 5.1 Driver}"
m.lcOdbcServer 		= "localhost"
m.lcOdbcPort 		= "0"
m.lcOdbcOption 		= "3"
m.lcOdbcDatabase 	= "xxxxxxxx"
m.lcOdbcUser 		= "xxxxxxxx"
m.lcOdbcPassword 	= "4D54497A4E4455324E7A673D"

m.lcLocalDatabase 	= "datos"
m.lcLocalConnection = "datos"

m.lcString = 	m.lcOdbcDriver + .....

Open Database (m.lcLocalDatabase)
Set Database To (m.lcLocalDatabase)

*!* Set local connection properties:
DBSetProp(m.lcLocalConnection, "CONNECTION", "ConnectString", m.lcString)

*!* open shared connection:
Thisform._SqlHandle = SQLConnect(m.lcLocalConnection, .T.)

*!* If runtime, clear connection string:
If Version(2) = 0 Then
	DBSetProp(m.lcLocalConnection, "CONNECTION", "ConnectString", "")
Endif

If Thisform._SqlHandle < 0 Then
....
Endif
Carlos Alloatti
Previous
Reply
Map
View

Click here to load this message in the networking platform