fetch Data from a database using C