Hi Everyone,
I wonder if somebody knows what sets the value resulting from the HOST_ID()
function in SQL2000.
It seems that the OleDb connection sets that property (and pass it to the
server when setting up the connection).
My problem is that I need to create 2 connections in my application to the
same database/server using the same credentials, but I need both connections
to return different HOST_ID().
I haven't been able to accomplish that, currently my both, different
connections return the same HOST_ID() when querying the database.
Any ideas?
Thanks, Jos Araujo.You can specify the desired host name using the 'Workstation ID' connection
string keyword or OLEDB property:
Provider=SQLOLEDB;Data Source=MyServer;Initial Catalog=MyDatabase;Integrated
Security=SSPI;Workstation ID=MyHost"
Hope this helps.
Dan Guzman
SQL Server MVP
"Jos Araujo" <josea@.mcrinc.com> wrote in message
news:O3f60VwQGHA.5808@.TK2MSFTNGP12.phx.gbl...
> Hi Everyone,
> I wonder if somebody knows what sets the value resulting from the
> HOST_ID()
> function in SQL2000.
> It seems that the OleDb connection sets that property (and pass it to the
> server when setting up the connection).
> My problem is that I need to create 2 connections in my application to the
> same database/server using the same credentials, but I need both
> connections
> to return different HOST_ID().
> I haven't been able to accomplish that, currently my both, different
> connections return the same HOST_ID() when querying the database.
> Any ideas?
> Thanks, Jos Araujo.
>
>
>|||It is not quite exactly what I wanted: I wanted to change the HOST_ID()
return value, it changes the HOST_NAME() return value.
However: I can workaround my problem by using this.
Thanks! Jos.
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:O1mkLmyQGHA.5468@.TK2MSFTNGP14.phx.gbl...
> You can specify the desired host name using the 'Workstation ID'
> connection string keyword or OLEDB property:
> Provider=SQLOLEDB;Data Source=MyServer;Initial
> Catalog=MyDatabase;Integrated Security=SSPI;Workstation ID=MyHost"
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Jos Araujo" <josea@.mcrinc.com> wrote in message
> news:O3f60VwQGHA.5808@.TK2MSFTNGP12.phx.gbl...
>|||I'm glad my answer helped, even though it wasn't exactly what you were
looking for :-)
Dan Guzman
SQL Server MVP
"Jos Araujo" <josea@.mcrinc.com> wrote in message
news:evtB6U4QGHA.1576@.tk2msftngp13.phx.gbl...
> It is not quite exactly what I wanted: I wanted to change the HOST_ID()
> return value, it changes the HOST_NAME() return value.
> However: I can workaround my problem by using this.
> Thanks! Jos.
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:O1mkLmyQGHA.5468@.TK2MSFTNGP14.phx.gbl...
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment