opening a connection object via citrix?

  • Hi there,

    I've dropped this in here on the off-chance that someone might be able to suggest.  it's also posted in Programming>Connecting

     

    *****

     

    Hi all,

    I'm trying to set up an ADODB connection to a SQL Server 2000 instantance in an Active X script in DTS. Below is my code. When I run this I get the error message

    Login failed for user "myuser".

    I'm connecting over a Citrix connection and have discovered that if I log on via VNC and set the Data Source to (local) then all is well. If I connect via Citrix then I cannot set (local) and if I set Data Source to the server name listed at the top of the group I cannot get the db to authenticate the user.

    I realise that 'work directly on the box' is the answer but for dev purposes and because of our set up it's not practical.

    (Excuse the code, it's cribbed as this is my first time being The DTS Guy).

    Dan

     

    ****CODE****

    '**********************************************************************

    ' Visual Basic ActiveX Script

    '************************************************************************

    Function Main()

    dim myConn

    dim myRecordset

    dim iRowCount

    ' instantiate the ADO objects

    set myConn = CreateObject("ADODB.Connection")

    ' set the connection properties to point to the Test3 database,

    ' using the Customers table

    'This works via VNC but not via Citrix

    'myConn.Open = "Provider=SQLOLEDB;Data Source=(local); Initial Catalog=TEST_3;user id = 'myuser';password='myuser'"

    'This fails on the user via Citrix

    myConn.Open = "Provider=SQLOLEDB;Data Source=PATHD001; Database=TEST_3;UID='myuser';PWD='myuser'"

    MsgBox "Here!"

    Main = DTSTaskExecResult_Success

    End Function

  • So you can log in using

    server=(local),  user=myuser,   pass=myuser

    when using VNC, but this fails in a Citrix session?

    Hmm - What if you specify the servername in the VNC console session - do you still get an error?

    Are you sure you are connecting to the correct SQL Server (perhaps you actually want an instance rather than the computer's default instance?).  To check, do

    select @@servername

    once you have a working connection to the server.

    Does the login 'myuser' appear in the master.dbo.sysxlogins table (in the name column)?

  • Hi Ian,

    I can log in using server=(local)..... (in VNC session) BUT if I change this to the server name e.g. TESTD01 I get 'log in failed for user xxx' message.

    I've checked @@servername and it returns TESTD01 and I've checked the syslogins table and the user xxx exists.

    I'm going to have to give the test team a VNC viewer to kick the job off but it'd be nice to solve the mystery....any thoughts?

     

    D,

  • Run

    cliconfg.exe in c:\windows\system32.

    It will list the aliases that you have set up for SQL Server client connections - I am not sure if this is user specific or machine specific (ie, different users get different aliases, or if all users on the machine get the same set) - perhaps you have an alias set up and SQL is using that instead?

    You could also check, using the same tool, the protocols that you have enabled and in what order they are attempted.  I have TCP/IP and Named Pipes enabled on mine - with TCP/IP first.

    Short of that, you could also try installing MDAC 2.8 if you don't already have it?

    Good luck - let us know how you go! 

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply