DSNless connection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

DSNless connection

Sean M-3
I saw this was a feature request a while back, and you guys flagged it as a
possible enhancement (enhancement #237) but it doesn't seem like it ever
made it into any of the 5.1.x updates.

Is it planned? If not, can I make a +1 request for it, for either a 5.1.5
(Which I don't think is coming?) or 6.0 please pretty please? :)

I've hacked my image to support it, but it'd be cool to be able to dsnless
connections with no modifications

Major reason is a product I'm working on is targetted at non-technical users
who wouldn't even know what a DSN is let alone how to create one.

I know I know, I could use InnoSetup to create one for me, but I want the
app to work by copying it to machines without the need for an installer to
have configured anything.


Reply | Threaded
Open this post in threaded view
|

Re: DSNless connection

Sean M-3
> Major reason is a product I'm working on is targetted at non-technical
> users who wouldn't even know what a DSN is let alone how to create one.

And before anyone says "Just use ADO". I'm using ReStore. I guess one could
write an adapter  to make an ADOConnection instance look like a DBConnection
instance.. but where's the fun in that?


Reply | Threaded
Open this post in threaded view
|

Re: DSNless connection

Andy Bower-3
Sean,

> > Major reason is a product I'm working on is targetted at
> > non-technical users who wouldn't even know what a DSN is let alone
> > how to create one.
>
> And before anyone says "Just use ADO". I'm using ReStore. I guess one
> could write an adapter  to make an ADOConnection instance look like a
> DBConnection instance.. but where's the fun in that?

AS far as I can see #237 was fixed on 26/2/2002. There is a test in D6
that I've reproduced below to illustrate how the DSN-less connections
should work. It should also work in D51 Does this do what you want?

testDSNlessConnection
        "See MSDN help 'SQLGetInfo Returned Values for Access"

        | c |
        c := DBConnection new.
        c connectString: 'DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=c:\program files\microsoft
office\office11\samples\NorthWind.mdb'.
        c open.
        self assert: (c tables includes: 'Customers').
        c close.
        c := DBConnection new.
        c connectString: 'DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=c:\program files\microsoft
office\office11\samples\NorthWind.mdb'.
        c useDriverCompletion: false.
        c open.
        self assert: (c tables includes: 'Customers').
        c close.
        "#1473"
        c := DBConnection new.
        c connectString: 'DRIVER={Microsoft Text Driver (*.txt; *.csv)}'

Best regards
 
Andy Bower
Dolphin Support
www.object-arts.com


Reply | Threaded
Open this post in threaded view
|

Re: DSNless connection

Sean M-4
> AS far as I can see #237 was fixed on 26/2/2002. There is a test in D6
> that I've reproduced below to illustrate how the DSN-less connections
> should work. It should also work in D51 Does this do what you want?

Coooooooooooool

Thanks. Works in D51 too. I was using #dsn: and doing dodgy stuff behind the
scenes to make it work. Now that I look at the code I should have paid more
attention to connectString/connectString: !