Using Xojo 2015 R4.1, I have 2 different apps that share some of the same code. The desktop GUI app compiles and works fine. However a Service Application gets an error “cant find a type with this name” when using PostgreSQLDatabase.
If DbManagerToUse = "PostgreSQL" then
Db = New PostgreSQLDatabase
Else
Db = New sqlitedatabase
End if
This same code is in both apps. And, I could swear it worked fine before (last compiled 3/12/2016). No changes have been made to this code either. Also, the same error occurs wherever ‘PostgreSQLDatabase’ is used in this app. No error in the desktop app.
Can anyone point me in the right direction to fix this?
Have you tried the same code in a new project? Does that work?
I’d guess there is more going on in your project that is causing the error. Could be corruption, or some other odd bit of code somewhere in conflict with what you’ve shown. I have no clue what it would be, but I don’t think it’s Xojo.
You might try removing all plugins that you don’t need and give it a try.
I had an issue with the Chilkat plugin the other day. I can’t remember for sure, but is seems desktop apps worked fine, but when I went to work on a WE app one of the other plugins wouldn’t load. I was getting the same error you are getting, until I removed the Chilkat plugin.