Re: VFP 8 and ODBC connection



Hi Adrian,

it may be perfectly okay to decide to have a seperate
application server (including a web server) and a database
server and while they may be connected via LAN
to choose to make ODBC connections only.

But as you say you use UNC path within the ODBC
or OLEDB connection you surely could also use native
data access without ODBC or OLEDB, if you would
run eg AFP (active foxpro pages) instead of ASP or
make use of VFP multithreaded COM DLLs via
ISAPI.

You would unleash the full performance of VFP
and it's native data access if iis and database are located
on the same server, using vfp code and native data access,
but I think this is out of question right now, as it would
need a major rewrite.

You say you setup a domain user account capable to access
application/IIS and database server, but do you perhaps confuse
iis manager user accounts with the iis system user, under which
asp and other scripts will run? That user needs sufficient rights
to the database server and/or OLEDB/ODBC.

How are you connecting to the vfp data? Classic ASP
would be like classic VB and VBA like in Office Word
or Excel, take a look at the examples in the dv_FoxProvider.chm which should be coming with the VFP OLEDB Provider.

There are indeed two ways to connect:
1. OLEDB without DSN
oConn = CREATEOBJECT("ADODB.Connection")
oConn.ConnectionString = "provider=vfpoledb.1;data source=unc path\MyTestDatabase.dbc"
oConn.Open()

2. OLEDB using a DSN
oConn=CREATEOBJECT("adodb.connection")
oConn.ConnectionString="Provider=vfpoledb;DSN=ODBCDataSourceName"
oConn.Open()

If you have choosen the second approach you are using
ODBC over OLEDB which in fact makes it more complicated
as it should be and will need both OLEDB provider and ODBC
driver for VFP installed plus it will restrict you to VFP6 features
only, as the latest ODBC driver was made for VFP6 and if
you set up a DSN for your DBC and it has some newer feature
the connection will fail anyway, which may also be your problem.

Bye, Olaf.
.



Relevant Pages

  • Re: ADO Connection Timeout
    ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Complicated Connection Problems bewteen ADP and SQL Server
    ... This database ... expertise for getting the user workstations talking to the SQL Server. ... connection would fail and the adp wouldn't be able to talk to the server. ... might be in my ADO connection string. ...
    (microsoft.public.access.adp.sqlserver)
  • Complicated Connection Problem between ADP and SQL Server
    ... This database ... expertise for getting the user workstations talking to the SQL Server. ... connection would fail and the adp wouldn't be able to talk to the server. ... might be in my ADO connection string. ...
    (microsoft.public.sqlserver.connect)
  • Re: ADO Connection Timeout
    ... so what happens when a connection failure forces one station to revert ... to a local database? ... Further, you *will* have contention issues, Jet does not support record ... to the central server, but you are willing to live with periods where it ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... When the first test is run, the results are stored in the central database. ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)

Loading