Forum Discussion

Kateryna's avatar
Kateryna
Contributor
13 years ago
Solved

Changing server name in database checkpoints

Hello,



Recently I removed TestComplete with all tests to another server. Now I have to change server name in all database checkpoints into a new one. And in order to save these changes I have to update data in table. To do that I have to run each testcase. And I have a lot of them and usually run them automatically at night. So is it possible to change server name without updating data in tables?



Thank you.

  • As mentioned, beyond that, I don't have anything else to add.  My only other suggestion, I guess, would be to make sure that the server you're trying to access is accessible from the machine you're running the tests from.  Make sure that you can, outside of DBTable objects, connect to that server using the SQL ConnectionString (like using an ADO object or something).  It might be something simple like a mistyped character or something.

9 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    When you create the DBTable checkpoint originally, there's a set of options to create the connection to your database.  You can specify there the type of data connection.  See the attached screenshot.


  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    One thing that I do is I alter the connection string directly in script code to make the test transportable.



    If your DBTable object is named Table1, you can access the connection string as a writable object using



    DBTables.Table1.ConnectionString
  • I tried to do like that:

    procedure ChangeServer;



    beginDBTable.Table1_ItemStructure.ConnectionString :=    'Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=NL3_TestComplete;Data Source=UA-KYIV-FS1';



    end;



    But nothing changed.




  • Maybe I need a login and password? But I'm using Windows NT Integrated security, how can I write that in the script?
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    That's actually how I'm doing it, too.



    It could be that either your user you're logged in under doesn't have access or you might need to have set up the DBTable object itself originally to use NT auth...  Either way, I'm not sure why that's not working for you.
  • And how should I set up the DBTable object itself originally to use NT auth... ?
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    As mentioned, beyond that, I don't have anything else to add.  My only other suggestion, I guess, would be to make sure that the server you're trying to access is accessible from the machine you're running the tests from.  Make sure that you can, outside of DBTable objects, connect to that server using the SQL ConnectionString (like using an ADO object or something).  It might be something simple like a mistyped character or something.