Char to string

Converted RunQuery to use string instead of char* for the query.