"No such system DSN as x"

From: simon dot burrows at staffplan dot co dot uk ("simon)
Date: 06/29/04

  • Next message: Bill N: "What causes a 'Parameter Information cannot be derived from SQL statements with sub-select queries' error?"
    Date: Tue, 29 Jun 2004 12:46:41 +0100
    
    

    You'll probably think I'm crazy, but I have a good reason for making
    very limited use of ADO in a legacy delphi app which uses the BDE. Both
    the BDE datasets and the ADO datasets are connecting to the same SQL
    Server database using the same ODBC alias (yes okay I know it sounds
    horrible but bear with me).

    The code which uses ADO starts as follows:

    qryADOLock := TADOQuery.Create(Self);
    qryADOLock.ConnectionString := Format('Provider=MSDASQL.1;Persist
    Security Info=False;Data Source=%s;User ID=%s;Password=%s', [AliasName,
    Username, Password]);

    ...where AliasName is the name of the ODBC System DSN.

    This worked okay in development. Deployed to 1 site and it worked ok
    for the sys admin. However, when he rolled it out, users were getting
    the error "No such system DSN as [AliasName]" at the point when the ADO
    query connected.

    If the sys admin logged onto the same machine where the error was
    occurring, it worked ok, so the error must be related to permission.

    Can anyone suggest what permissions may be causing this? My only
    thought is that the ADO connection is attempting to create a temporary
    file which it doesn't have permission to write, but this seems unlikely.


  • Next message: Bill N: "What causes a 'Parameter Information cannot be derived from SQL statements with sub-select queries' error?"

    Relevant Pages

    • D7 & ADO with ASA9: EOLEException & Multiple-step error
      ... If I rest my pointer over the ".AsString" part of AdoDataMod.aquGetClipReadOnly.FieldByName.AsString, I get the yellow ribbon hint with the text "Delphi Exception EoleException at ... I tried removing the fields from the ADO query, I tried adding them back in again, I tried closing everything and rebooting - so far so bad... ... The BDE version has been working with identical data for nearly 10 years without a hitch - it still is. ...
      (borland.public.delphi.database.ado)
    • Re: BDE support??
      ... > We have an application that is using controls descended from TDatabase, ... > we'd like to convince the higher ups to ditch the BDE and move to ADO. ... Very nice for unit testing, ...
      (borland.public.delphi.non-technical)
    • Re: Conversion from BDE to ADO
      ... I've noticed no performance problems with ADO and MSSQL. ... conversion). ... > I am currently experimenting with converting a quite large app from BDE to ...
      (borland.public.delphi.database.ado)
    • ADO and BDE interact on XP SP2?
      ... It uses the BDE ... indirectly to connect to a database. ... also optionally uses ADO to connect directly to the database for ... but of course any built in initialisation will have taken place. ...
      (borland.public.delphi.database.ado)
    • Re: Enhancing ADO Performance
      ... > currently have applications constructed to retrieve data from ODBC ... > worked with both because of the installation issues when using the BDE ... It seems that ADO ... of data and hooking to a DB grid, use a server-side cursor. ...
      (borland.public.delphi.database.ado)