I am having trouble figuring out the right way to do this, clearly missing something obvious. I am simply trying to pass the current database to BackgroundWorkerInitializeConnection, but MyDatabaseId is showing as 0, and I am getting this error in the running of function get_database_name here at the top:
ERROR: invalid cache ID: 21 char *database_name = get_database_name(MyDatabaseId); /* ... */ /* Connect to our database */ BackgroundWorkerInitializeConnection(database_name, NULL); Any direction would be much appreciated. I have tried to look at example uses of MyDatabaseId and not sure what I'm missing here. Thanks, Jeremy