How to Delete Database using Code Module

Best practices, code snippets for common functionality, examples, and guidelines.
Posts: 7
Joined: Thu Sep 07, 2017 2:31 pm

How to Delete Database using Code Module

Post by haye7889 » Wed Nov 01, 2017 8:17 pm


I'm wondering if there is a way to truncate a database using a code module.
The tutorial for code modules haven't been helpful and I'm not a developer, so I was wondering if this was possible.
I want to basically run a test case where I have my user log in, adds some data, truncate the database, log off, and close the application.
So any help is great.


User avatar
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to Delete Database using Code Module

Post by odklizec » Thu Nov 02, 2017 9:06 am


I'm afraid, there is not an out-of-the-box solution for this prepared in Ranorex. You will have to write such code. If you are not familiar with DB programming, I would suggest to use google to search for a piece of code, which would suit your purpose.

For example, these links may help... ... 2147217396
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration