Page 1 of 1

New to dotConnect

Posted: Sun 07 Apr 2013 19:06
by sabbato753
Hi,

I'm new to dotConnect, but also to Visual Studio (I'm used to python and coding in a notepad window, not all of these nested screens). I'm working in Lightswitch (VS12) to move away from MS Access (To get away from VBA) and am having an awful time with dotConnect for PSQL.

It connects fine in the VS12 Lightroom development window, where I can see all of the tables and schema with no issues. Using queries from the Server Explorer returns data appropriately. However, when I go to run, debug or publish the application, it does not show any results on any screens (just red x's) and provides a "cannot connect" notice.

I'm sure this is probably something incredibly simple to resolve, but I'm new to all of this...can anyone shine some light on what is happening, or how I can test it?

Re: New to dotConnect

Posted: Wed 10 Apr 2013 16:50
by Shalex
Please follow our tutorial: http://www.devart.com/dotconnect/postgr ... resql.html. If it doesn't help, specify the exact text of the error and the step of the walkthrough on which issue occurs. Notify us about the result.

Re: New to dotConnect

Posted: Sun 14 Apr 2013 00:30
by sabbato753
The tutorial works fine through Step 7. The issue comes when I actually attempt to build/run the application. At that time it produces the following error in the running application:

"Unable to load data. Please check your network connection and try loading again."

All areas where there SHOULD be data on the screen are instead replaced by a box with a red x inside of it.

Re: New to dotConnect

Posted: Tue 16 Apr 2013 15:48
by Shalex
sabbato753 wrote:"Unable to load data. Please check your network connection and try loading again."
This is a general exception. Please find out the provider-specific one with the following settings:
1) Visual Studio > Tools > Options > Debugging > General > clear the Enable Just My Code option
2) Visual Studio > Debug > Exceptions > select the Common Language Runtime Exceptions checkbox
Then run your Lightswitch application in the debug mode (F5) and skip (press Continue or F5) all general .NET Framework exceptions until you encounter a provider-specific error ("PgSqlException"). Choose "Copy exception detail to the clipboard" in the exception window and send us this information so that we can identify the reason of the problem.

Re: New to dotConnect

Posted: Wed 17 Apr 2013 14:58
by sabbato753
Ok, I've sent details to the link you mentioned, thank you. :)

In case anyone else cares or wants to contribute before/alongside support, the following messages are received:

First - two errors thrown that read "prepared transactions are disabled"
Second - System.UnauthorizedAccessException.Invalid cross-thread access at MSInternal.XcpImports.Check Thread()

Thanks for all your help so far. I'm really hoping I can get all this working quickly so I can decide whether to purchase or not!

Re: New to dotConnect

Posted: Wed 17 Apr 2013 15:27
by sabbato753
On two seconds worth of actual thought once reading that error, I solved the problem. I hadn't set prepared transactions up in Postgres. Once fixed, the error resolved itself.

Thanks for the help, I'm going to go kick myself now. ;)