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



>Problem #1: All of the examples and tutorials assume that you can just
>drop a TADOConnection component on your form and go from there. Since
>this is a DLL, there is no form. I seem to have worked around this by
>doing the grunt work manually, but I am unclear as to if I am missing
>something. (See below.)
If you are creating the components you use in the code you are doing it right.


>Problem #2: All seems to go well and good until I hit the db.Open(), at
>which point I get a "datasource name not found and no default driver"
>error. This is crap. I've tried countless variations on connection
>strings, including UDL files, and they all give the same error.
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

> Also, I
>notice that when I step through with the debugger after I set
>db.ConnectionString, but before the Open call executes, the debugger
>thinks ConnectionString is still an empty string
Your code sets Connectionstring := _ConnString;
are you sure you _connstring has a value?

>. (Not inaccessible or
>optimized away, but an actual empty string.) Is there something else I
>need to do before I set the ConnectionString to make it stick?

--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.