in reply to Open ADO connection with Win32::OLE (was: ADO)

The point is simple -- your $Conn->Open(...) opens database correctly, but your code just did not noticed that.

Try in your code for example following:

$Conn->Open("DSN=ENG_DB;UID=enguser;PWD=yt12xcj"); print '[[',$Conn->{DefaultDatabase},"]]\n";
but when you intentionally break your code to, say,
$Conn->Open("DSN=BADBADENG_DB;UID=enguser;PWD=yt12xcj"); print '[[',$Conn->{DefaultDatabase},"]]\n";
you'll see a difference!

I just modelled this situation on my computer.

BTW when searched a documentation, I noticed that VB sample code from MSDN does not checks for return code, it probably relies on On Error statement

Courage, the Cowardly Dog

Replies are listed 'Best First'.
Re: ADO
by LovelyGreeting (Novice) on Jul 02, 2002 at 02:53 UTC
    Courage, Yes, you are perfectly right. Thank you very much!