Subject Re: Repost: connecting to embedded server
Author Dorin Vasilescu
Yes, is possible, but the approach needs an entry in registry for the
DSN and the full path for ODBC libraries and fbclient.dll
I use ODBC without registering, from application folder
Some sample code
LPARAMETERS cDSN,cServerName,cDBName, cDLLPath, cRole
*cDSN entry in ODBC DSN
*cServerName server, name or IP
*cDBName database
*cDLLPath path to DLLs folder
*cRole user role


IF TYPE('cRole') <> 'C'
cRole = 'appuser'

oReg = NEWOBJECT('registry','registry.prg')

WITH oReg as registry OF Registry.prg
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN, 'Driver',
cDLLPath+'OdbcJdbc.dll' ,.t.)
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN, 'Dbname',
cServerName+":"+cDBName, .t.)
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN, 'User', ' ',
IF LOWER(oApp.cUserName) = 'administrator'
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN, 'Role',
'appadmin', .t.)
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN, 'Role',
'appuser', .t.)
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN,
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN, 'Client',
cDLLPath + 'fbclient.dll' ,.t.)
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN,
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN,
'ReadOnly','N', .t.)
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN, 'NoWait'
,'Y', .t.)
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN, 'Dialect',
'3', .t.)
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN,
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN, 'Password','
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN,
.writeRegistryString(HKEY_CURRENT_USER, SUB_KEY + cDSN,

--- In, "p_lerner" <plerner@s...> wrote:
> I'm developing with Visual fox pro. I was wondering if I can make a
> connection to the embedded server without installing ODBC drivers.
> Will calling to IBPhoenix's ODBC driver functions directly work?
> Has anyone done this before?
> Where can I get info about this? I have already been reading about
> ODBC driver, but I can't find docs about functions implemented and
> how to call them.
> How can I do that? I've never done this since I always connected
> using FoxPro's "sqlconnect()" function, wich only works if there's a
> ODBC driver installed on Windows.
> My goal is to deploy a small application wich may use the embedded.
> But I don't want users to install an ODBC driver.
> Thank's
> Pablo