Database connection
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Database connection
Hey guys,
I like to centralize the database connection string to switch fastly between 2 databases.
Does anybody knows how to do this?
I could imagine a solution like creating a string variable containing the connection string at the project suite level in testcomplete and using this variable value to create a dbtable variable at the test items level.
Is this possible in testcomplete?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use a function that returns differents ConnectionString with a CASE/OF.
function YourFunction(WichConnection: string): OLEVariant;
begin
case WichConnection of:
'A': result := ConnectionStringA;
'B': result := ConnectionStringB;
end;
end;
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for advice @RuanAlesi !
@PUM-Prodat-SQL Was this what you are looking for?
Sonya Mihaljova
Community and Education Specialist
