Subject | Re: Repost: connecting to embedded server |
---|---|
Author | p_lerner |
Post date | 2004-07-13T13:35:41Z |
Thanks, I will try to make this work. I have some other questions but
I will take them to the ODBC list.
PAblo
--- In firebird-support@yahoogroups.com, "Dorin Vasilescu"
<dorin_vas@y...> wrote:
I will take them to the ODBC list.
PAblo
--- In firebird-support@yahoogroups.com, "Dorin Vasilescu"
<dorin_vas@y...> wrote:
> Yes, is possible, but the approach needs an entry in registry forthe
> DSN and the full path for ODBC libraries and fbclient.dllcDSN, 'Driver',
> I use ODBC without registering, from application folder
> Some sample code
> PROCEDURE setDSN
> 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
>
> #DEFINE HKEY_CURRENT_USER -2147483647
> #DEFINE SUB_KEY 'Software\ODBC\ODBC.INI\'
>
> IF TYPE('cRole') <> 'C'
> cRole = 'appuser'
> ENDIF
>
> oReg = NEWOBJECT('registry','registry.prg')
>
> WITH oReg as registry OF Registry.prg
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> cDLLPath+'OdbcJdbc.dll' ,.t.)cDSN, 'Dbname',
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> cServerName+":"+cDBName, .t.)cDSN, 'User', ' ',
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> .t.)SUB_KEY + cDSN, 'Role',
> IF LOWER(oApp.cUserName) = 'administrator'
> .writeRegistryString(HKEY_CURRENT_USER,
> 'appadmin', .t.)SUB_KEY + cDSN, 'Role',
> ELSE
> .writeRegistryString(HKEY_CURRENT_USER,
> 'appuser', .t.)cDSN,
> ENDIF
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> 'CharacterSet','NONE',.t.)cDSN, 'Client',
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> cDLLPath + 'fbclient.dll' ,.t.)cDSN,
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> 'JdbcDriver','IscDbc',.t.)cDSN,
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> 'ReadOnly','N', .t.)cDSN, 'NoWait'
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> ,'Y', .t.)cDSN, 'Dialect',
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> '3', .t.)cDSN,
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> 'QuotedIdentifier','N',.t.)cDSN, 'Password','
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> ',.t.)cDSN,
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> 'SensitiveIdentifier','Y',.t.)cDSN,
> .writeRegistryString(HKEY_CURRENT_USER, SUB_KEY +
> 'AutoQuotedIdentifier','N',.t.)wrote:
> ENDWITH
> ENDPROC && setDSN
>
>
>
> --- In firebird-support@yahoogroups.com, "p_lerner" <plerner@s...>
> > I'm developing with Visual fox pro. I was wondering if I can makea
> > connection to the embedded server without installing ODBC drivers.there's a
> >
> > 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
> > ODBC driver installed on Windows.embedded.
> >
> > My goal is to deploy a small application wich may use the
> > But I don't want users to install an ODBC driver.
> >
> > Thank's
> >
> > Pablo