hi Martin,
[quoted text, click to view] Martin wrote:
>
> I did stumble on to something though: I started the "SQL Server
> Browser". Now, when my VB6 program tries to connect, I'm getting a
> different error message: "Login failed for user 'userid'" (where
> userid is the userid that's in my connect string).
is this all there is or does it continue with " not associated with a
trusted connection"?
if this is the case, you have to enable Mixed security authentication.. .you
can do that at install time unchecking the "hide advanced options" check box
and allowing standard SQL Server logins in the wizard or, if you provide a
set of command line parameters, providing the SECURITYMODE=SQL param as
well...
after install time you have to use SQL Server Management Studio Express,
access the server properties and, in the "security tab", enable standard
authentication as well..
by default, SQLExpress installs disabling standard SQL Server authenticated
connections and allowing trusted WinNT authenticated connections only...
[quoted text, click to view] >
> Does this mean that SQL Server Browser has to be running in order for
> my program to connect?
the SQLBrowser is a sort of gateway required when named instances with
dynamic assigned ports are used.. by default SQLExpress installs network
enabled named instance with this setting... this require the SQLBrowser to
be up and running as well as it is the first point of contact between remote
clients and the local server.. when a connection is requested, the
SQLBrowser listening on UDP 1434 port intecepts the incoming call, resolves
the actually used port and redirects the incoming call over that port...
you can disable the SQLBrowser if you are running the SQLExpress instance
over the "well known" port, TCP/IP 1433, the IANA assigned one to Microsoft
for SQL Server use, or if you set a "static port" for it, but you have, in
this latter case, to provide the used port in the connection string, like
connectionstring = "Data Source=ServerName\Instancename,PortNumber; Initial
Catalog=pubs; etc"
[quoted text, click to view] >
> Also, when I posted earlier, I was using msado 2.5 in my VB program.
> One of the things in the page you referenced mentioned that I needed
> at least version 2.6. I have 2.7 (and 2.8) on the machine where VB is
> running so I changed the reference to 2.7. That did not seems to make
> any difference however. Does that shed any light on the problem I
> might be up against?
MDAC 2.6 at least is required for SQL Server 2000, introducing the SQL
Server Resolution Service, the "ancestor" of SQLBrowser... but in your case
it does not play a big role as you only require the client "stuff" of te
MDAC stack, including ADO... on the contrary, SQLExpress requires MDAC 2.8..
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
--------- remove DMO to reply