Showing posts with label ssrvname. Show all posts
Showing posts with label ssrvname. Show all posts

Tuesday, February 14, 2012

Connect via sqldmo

Attempting to connect to MSDE 2000 via sqldmo w/ vb 6 app. For example,
oSqlServer.Connect sSrvName, "sa", sPswd
However, receiving the following error message "Not associated with a
trusted SQL Server connection"
I've looked on microsoft support, which offered a workaround for this error
(kb #889615). However, the workaround applied to Win98. This error is
occuring on a Win xp machine.
any help is appreciated.
hi Jim
jim wrote:
> Attempting to connect to MSDE 2000 via sqldmo w/ vb 6 app. For
> example, oSqlServer.Connect sSrvName, "sa", sPswd
> However, receiving the following error message "Not associated with a
> trusted SQL Server connection"
> I've looked on microsoft support, which offered a workaround for this
> error (kb #889615). However, the workaround applied to Win98. This
> error is occuring on a Win xp machine.
>
usually that exception means MSDE has been installed without allowing
standard SQL Server authenticated connections but trusted connections only
(that is the default)
please have a look at
http://support.microsoft.com/default.aspx?scid=kb;en-us;285097 for futher
info on how to modify the Windows registry to modify the setting..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
-- remove DMO to reply
|||Hi Andrea,
That absolutely worked! Your help is greatly appreciated. However, it
appears that I have run into another problem when attempting to attach db
files the msde installation.
I'm receiving the following error:
Error -2147216399. Device activation error. The physical file name
'C:\Program' may be incorrect.
I initially that this was due to permission error, so I included
ALLOWXDBCHAINING=1 in the setup parameters, but to no avail. Would it the
actual file location? That is, the space between "Program" and "Files"?
"Andrea Montanari" wrote:

> hi Jim
> jim wrote:
> usually that exception means MSDE has been installed without allowing
> standard SQL Server authenticated connections but trusted connections only
> (that is the default)
> please have a look at
> http://support.microsoft.com/default.aspx?scid=kb;en-us;285097 for futher
> info on how to modify the Windows registry to modify the setting..
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz http://italy.mvps.org
> DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
> -- remove DMO to reply
>
>
|||hi Jim,
jim wrote:
> Hi Andrea,
> That absolutely worked! Your help is greatly appreciated. However, it
> appears that I have run into another problem when attempting to
> attach db files the msde installation.
> I'm receiving the following error:
> Error -2147216399. Device activation error. The physical file name
> 'C:\Program' may be incorrect.
if you are using DMO to perform attabch, backup, restore operations you have
to better enclose paths in square brackets like
fileName = "[c:\program files\folder with spaces\file with spaces.xxx]"
if they include spaces..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
-- remove DMO to reply
|||Hi Andrea,
Sweet. I will definitely do so. I forgot that the AttachDB() or sp_attach_db
is pretty much a wrapper for CREATE DATABASE.
Thanks again for all of your help.
"Andrea Montanari" wrote:

> hi Jim,
> jim wrote:
> if you are using DMO to perform attabch, backup, restore operations you have
> to better enclose paths in square brackets like
> fileName = "[c:\program files\folder with spaces\file with spaces.xxx]"
> if they include spaces..
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz http://italy.mvps.org
> DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
> -- remove DMO to reply
>
>