Hello. I have installed the latest version of PostgreSQLDirect .NET for Visual Studio 2005. I want to run the CRM sample, so I've created a database in pgAdmin III, called "crm_demo". After that I ran the crm_demo.sql. When I run the sample in C# 2005, I've pressed the Connect button, I've entered the correct information, and after that I've received:
System.InvalidCastException was unhandled by user code
Message="Unable to cast object of type 'PersonContactDataTable' to type 'System.Collections.IList'."
Source="CrmDemo"
StackTrace:
at CrmDemo.MainForm.content_ListChanged(Object sender, ListChangedEventArgs e) in C:\Program Files (x86)\CoreLab\PostgreSQLDirect.NET2\Samples\CRM\CS\MainForm.cs:line 97
at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)
at CoreLab.Common.j.b(Object A_0, ListChangedEventArgs A_1)
Can anyone tell me how to run those samples correctly?
Can't run samples
Re: Solved
What error?CNPSV wrote:I still cat an error at the first load, but after that, it works.
The Error
Unable to cast object of type 'CompanyDataTable' to type 'System.Collections.IList'.
" at CrmDemo.MainForm.content_ListChanged(Object sender, ListChangedEventArgs e) in C:\Program Files (x86)\CoreLab\PostgreSQLDirect.NET2\Samples\CRM\CS\MainForm.cs:line 97\r\n at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)\r\n at CoreLab.Common.j.b(Object A_0, ListChangedEventArgs A_1)"
" at CrmDemo.MainForm.content_ListChanged(Object sender, ListChangedEventArgs e) in C:\Program Files (x86)\CoreLab\PostgreSQLDirect.NET2\Samples\CRM\CS\MainForm.cs:line 97\r\n at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)\r\n at CoreLab.Common.j.b(Object A_0, ListChangedEventArgs A_1)"