Re: Can't connect with ConnectionString (D7+ADO)



Brian Bushay said:
Services run under a different user with different permissions
> that what you log on to your computer with.  If you are using a
> mapped driver try switching to UNC

Yep. But right now I'm just trying to get it to work interactively. I have a C++ DLL that I am (sort of) porting this from, and I can fire it up and, using the exact same connection string, it works fine. Of course, it's not going through ADO.

Your code sets Connectionstring := _ConnString;
are you sure you _connstring has a value?

Yep. While stepping through the code, I can hover my mouse over _ConnString and see that it has the right value. Then I execute the assignment and mouseover db.ConnectionString and see that it is empty. Just in case, I execute the next line (the db.Open), at which point I get the error. It's completely baffling to me. I would figure that if it didn't like my connection string it would complain about it, right? Not just be stubborn and refuse to take the assignment?


And yep, I've tried doezens of different connection strings. From the really simple ("DSN=authtest;user=admin;pwd=;") to UDL files to specifying the provider to specifying the driver. Each one works great with the C++ version of the DLL, but then I get the same error in the Delphi version. I am completely at a loss.

Is there some trick to setting up ADO in a multi-threaded situation? Does it know that I'm going through the motions for multi-threadedness and needs some sort of extra info that I'm apparently not giving it? (And why am I the only person having these problems? Is anyone else using ADO in a multi-threaded environment? In a GUI-less environment?)

-R
--
Rick Osborne, NOrickoSPAM@xxxxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: Configuration for DLL
    ... The classes in the DLL will be used by VBScripts. ... How can I get it to look at the installation directory? ... assembly is called "MyConnection.dll" create a configuration ... Add your connection string to it: ...
    (microsoft.public.dotnet.general)
  • Re: ASP.Net 2.0: Pros and cons of putting connection string in a D
    ... I haven't made any .net dlls, but I used to put the connection string of asp ... sites in a classic vb dll. ... So if you try this with a .net dll, be sure and test it to see if you can ... I have also tried using the encryption feature in ASP.Net 2.0 to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Where to place app.config file
    ... Project2 = PresentationLayer (DLL) ... Connection which retruns a SqlConnection object. ... In the DataLayer Static method, ... passising it's connection string from there. ...
    (microsoft.public.dotnet.languages.csharp)
  • ASP & COM+s enable object construction
    ... is using a DB Access DLL written in VB. ... the COM+ package is a server package with ... the administrator, it does go through COM+ and the connection string ...
    (microsoft.public.inetserver.asp.general)
  • Re: Dynamically loading controls -> loosing type
    ... Another poster had a similar problem a while ago, ... I suspect that you're having some sort of problem between DLL versions. ... Windows.Forms types that had been declared through a project reference. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)

Loading