Project database settings usage

Please someone help me. I can not understand how to use/connect to my db which I set in project settings. How can I connect to it or how to get variables which I used? I can`t figure out…
Only found how to connect to db with own variable but not set in project settings :confused:

you can use settings from project when you are defining new data source of DB type in Data Files


Thanks. But problem is other. Can I use these settings in my script to execute query? Not only for data files

can you please elaborate on wanted usage? simple use case?

This case:
My script send coupon code to input, example in buying process.
Coupon code can be various types and according to type should be different cases.
I don`t know what code was entered, so I want to execute query with given code to get his type from db.

i don’t think settings of DB in project will help you. Unfortunately you will need to go with DB based testing with custom keywords to be able to execute db requests as you like.
i guess you allready know this:

Yes, I done like this but hopped that I could change it.
Well, thanks. Leave as it is now…