Re: Error using ADO

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: swdev2 (wsanders.bob_at_bob.efgroup.com)
Date: 08/12/04


Date: Thu, 12 Aug 2004 15:02:45 -0500

Heya Darren -
1. if you are making a middle tier thingie ? Why leave the 'set step on'
here in in your codebase?
2. ADO ? it only resides in memory. What does 'this' look like when you go
back to reading/writing VFP tables as VFP tables ? sans ADO ? If you are
passing things around from 1st tier to 3rd tier, I would recommend NOT using
ADO as you are sucking memory resources. Some time, some day, you'll hit
the wall BOOM with no more memory for your 'object' .

3. does lcConnectionString actually evaluate to a nicely formed text
string? or is it/ does it eval to NULL ?
4. what is value of loRS after the first assignment ?
5. instead of 'with loRS ...... what happens when you issue , directly,
[loRS.Open()] ??
6. what are the rights for the IUSR account IN
"C:\operaii\data\comp_z.dbc" ?

warmest regards / snogs round the ankles [Bill]

--
William Sanders / Electronic Filing Group  Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
VFP Webhosting? You BET! -> http://efgroup.net/vfpwebhosting
mySql / VFP / MS-SQL
"Darwood" <darrenw@nospamme.woodfordcomputers.co.uk> wrote in message
news:ONp5qaIgEHA.3476@tk2msftngp13.phx.gbl...
> I have created a middle tier project and am trying to pass the data up to
> the presentation tier using ADO. When I try to move (If !objCustomers.EOF
> MoveFirst etc) through the recordset from the top tier I get a message
> saying "Runtime 3704: Operation is not allowed when the object is closed"
> I am therefore trying to just create a simple ADO example without using 3
> tier model. This too is giving me grief. I get the message "OLE exception
> error: Exception code c0000005 OLE object may be corrupt"
> My Customer on a separate machine has replicated the first problem but not
> the second. Is it the ADO OLE object that is corrupt? How do I repair my
ADO
> objects?
>
> I have got the VFP8 OLE DB Provider from the web installed.
> I have put the code below that causes the second error.
>
> #include "ADOVFP.H"
>
> Set Step On &&delete this line o Daryl
> loCustomers = GetCustomers()
>
>
> Function GetCustomers
>
>  loConnection = CreateObject("ADODB.Connection")
>
>  **************************************************
>  ** This connection string must be parameterised **
>  **************************************************
>  lcConnectionString = "provider=vfpoledb;data source=" +
> "C:\operaii\data\comp_z.dbc"
>  loConnection.ConnectionString = lcConnectionString
>
>  loConnection.Open
>
>  lcFilter = ""
>
>  loRS = CreateObject("ADODB.Recordset")
>  With loRS
>   .ActiveConnection = loConnection
>   .Source = "sname"
>   .CursorType = adOpenStatic
>   .LockType = adLockReadOnly
>   .CursorLocation = adUseClient
>   .Open()            && This is the line that gives exception code
c0000005
>   .Filter = lcFilter
>  EndWith
>
>  Return loRS
>
> EndFunc
>
> --
> Regards
> Darren Woodford - MCP, MCSE
> Woodford Computer Systems Ltd
> http://www.woodfordcomputers.co.uk
> http://www.pegasus-opera-ii.co.uk
>
>


Relevant Pages

  • Error using ADO
    ... I have created a middle tier project and am trying to pass the data up to ... I am therefore trying to just create a simple ADO example without using 3 ... Is it the ADO OLE object that is corrupt? ... Woodford Computer Systems Ltd ...
    (microsoft.public.fox.programmer.exchange)
  • convert to 3 tier ?
    ... I"m checking the option to convert my application (Delphi7/ ADO / MsSql) to ... tier. ... anyone know regarding the licence policy? ...
    (borland.public.delphi.database.ado)