Database connection differences between Windows NT & ME... (from old NG)

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

Database connection differences between Windows NT & ME... (from old NG)

Christopher J. Demers
[The first on-topic post with some meat on its bones.  ;)]

I am using the Dolphin Database Connection to work with a Sybase SQLAnywhere
database.  I have been developing it on Windows NT, and everything works
well.  I recently tried my program on a Windows ME machine, and things don't
seem to behave the same way.

I am using the connect method on Windows NT to open the database from a DSN.
That works fine.  However when I use connect to open the database on Windows
ME I get an SQL error saying that it was 'unable to start database engine'.
If I run another program that uses the database first it loads the driver
and then my code works normally.

If I use the open method then the driver loads, but displays a user name and
password prompt first.  It displays this prompt even if I provide the user
name and password to the connection programmatically, it will have my user
id and password in the dialog, but the user still has to accept it.  This
dialog box does not come up in Windows NT.

Does anyone know of a way around this?  Is this a "normal" difference
between NT and ME, or does it sound like a driver quirk?  The other program
(built in Power Builder) works the same in both NT and ME, it uses the same
DSN but does not display the password prompt.  I am hoping that there is a
simple general purpose solution that someone knows about.  Otherwise I will
be doing some investigating I guess. ;)

--
----
Chris


Reply | Threaded
Open this post in threaded view
|

Re: Database connection differences between Windows NT & ME... (from old NG)

Chrissie
Hi Chris,
Are you using a Laptop? Anymore info on your 'Me' machine, maybe someone
will be able to help that way.
Chrissie.
"Christopher J. Demers" <[hidden email]> wrote in
message news:8sqgp5$l8kc2$[hidden email]...
> [The first on-topic post with some meat on its bones.  ;)]
>
> I am using the Dolphin Database Connection to work with a Sybase
SQLAnywhere
> database.  I have been developing it on Windows NT, and everything works
> well.  I recently tried my program on a Windows ME machine, and things
don't
> seem to behave the same way.
>
> I am using the connect method on Windows NT to open the database from a
DSN.
> That works fine.  However when I use connect to open the database on
Windows
> ME I get an SQL error saying that it was 'unable to start database
engine'.
> If I run another program that uses the database first it loads the driver
> and then my code works normally.
>
> If I use the open method then the driver loads, but displays a user name
and
> password prompt first.  It displays this prompt even if I provide the user
> name and password to the connection programmatically, it will have my user
> id and password in the dialog, but the user still has to accept it.  This
> dialog box does not come up in Windows NT.
>
> Does anyone know of a way around this?  Is this a "normal" difference
> between NT and ME, or does it sound like a driver quirk?  The other
program
> (built in Power Builder) works the same in both NT and ME, it uses the
same
> DSN but does not display the password prompt.  I am hoping that there is a
> simple general purpose solution that someone knows about.  Otherwise I
will
> be doing some investigating I guess. ;)
>
> --
> ----
> Chris
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Database connection differences between Windows NT & ME... (from old NG)

Ian Bartholomew
In reply to this post by Christopher J. Demers
Chris,

> [The first on-topic post with some meat on its bones.  ;)]

If there was a prize then you'd win it <g>

> Does anyone know of a way around this?  Is this a "normal" difference
> between NT and ME, or does it sound like a driver quirk?  The other
program
> (built in Power Builder) works the same in both NT and ME, it uses the
same
> DSN but does not display the password prompt.  I am hoping that there is a
> simple general purpose solution that someone knows about.  Otherwise I
will
> be doing some investigating I guess. ;)

I don't use ME or Sybase (so why am I replying I hear you all shout) but a
couple of thoughts -

Do you users log onto ME or have they bypassed the log on, assuming ME lets
you do that.  Sybase might need a user name to attach changes to?

Have you tried creating a simple data source using, say, MS Access drivers
and seeing if the same thing happens. It might narrow it down a bit.

Ian


Reply | Threaded
Open this post in threaded view
|

Re: Database connection differences between Windows NT & ME... (from old NG)

Christopher J. Demers-2
"Ian Bartholomew" <[hidden email]> wrote in message
news:8ssjmf$lfb5m$[hidden email]...

>...
> Do you users log onto ME or have they bypassed the log on, assuming ME
lets
> you do that.  Sybase might need a user name to attach changes to?
>...

Thanks for the response.  No, the system logon is normal, and I can see most
of the DSN settings in the right place in the registry.  I did some
investigating yesterday, and I understand some of the issues better now.  It
turns out that Sybase needs a database engine to be running when you connect
to it.  On my Windows NT machine this was working automatically via a Start
parameter launching the database engine upon DSN access.  This was not
happening on the ME machine.  I looked at the ODBC configuration and found
that both computers had a Start parameter in the DSN configuration advanced
options.  It seemed that the open method in Dolphin used this, and the
connect method did not (on Windows ME).  I did some deeper digging and found
that the registry entry for the DSN on NT had the Start parameter set
correctly, but there was no Start parameter in the ME DSN, yet the ODBC
config screen still showed it, and the registry had all the other settings.
I thought that it could be in the ODBC.INI compatibility file, but that file
does not exist on my machine.  After doing all kinds of string searches on
my system I guess the parameter must be stored in a very odd place, or is
simply a default value that is dynamically displayed in the DSN config
dialog unless it is changed, when it is then committed to the registry.
When I added the key to the registry the database worked as expected with
the connect method.

The problem is that I am developing my application as an add-on to another
3rd party application, so I don't have total control over the registry and
DSN settings for the database.  There are some tricks that I think I can do
to make this work almost smoothly.  I just wish I did not have to jump
through so many hoops to make it work.

Thanks,

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Database connection differences between Windows NT & ME... (from old NG)

Christopher J. Demers-2
In reply to this post by Chrissie
"Chrissie" <[hidden email]> wrote in message
news:8ss6kv$k4v$[hidden email]...
> Hi Chris,
> Are you using a Laptop? Anymore info on your 'Me' machine, maybe someone
> will be able to help that way.

Actually yes it is a laptop, however I have a memory of something similar
happening on a Windows 98 desktop some time ago.  I think I have a better
understanding of the problem now.  Some configuration information is being
stored and/or interpreted differently on the two computers.  If I jump
through the right hoops I think I can make it work.  See my response to
Ian's message for more information.

Thanks,

Chris