Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 3 Jahren, 10 Monaten
Letzter Beitrag:
vor 3 Jahren, 10 Monaten
Beteiligte Autoren:
Mark Crichton, Alexandre Leclerc, Bart VDE

nullable for .net assembly

Startbeitrag von Mark Crichton am 30.08.2014 23:27

I am trying to pass a parameter to a .net assembly and have to declare the variable as type nullable.

How do I do this in WinDev?

code is:
// nStatus is int = 12002 gives error
nStatus = new Nullable(12002)
ClLstSales = clGateway.Sales.GetSalesOrders(Null,nStatus,Null,Null,Null,Null)
// gives No Syntax of getSalesOrders is compatible

dotnet code is
// GetSalesOrders
// Parameters:
// pageNumber : Nullable
// status : Nullable
// createdFrom : Nullable
// createdTo : Nullable
// modifiedFrom : Nullable
// modifiedTo : Nullable
// Return Value:
// PagedCollection

[ = ] GetSalesOrders (LOCAL pageNumber is Nullable, LOCAL status is Nullable, LOCAL createdFrom is Nullable, LOCAL createdTo is Nullable, LOCAL modifiedFrom is Nullable, LOCAL modifiedTo is Nullable)

many thanks



Hi Mark

Did you try with declaring your nStatus as 4-byte int or 8-byte int?


von Bart VDE - am 31.08.2014 00:01
Hi Bart
Thanks for your response
That did not help unfortunately. It seems Nullable types are different.

von Mark Crichton - am 31.08.2014 05:26
Hi Mark,

My reaction was to say "it looks like a pointer to an integer". It is almost: it's a pointer to a structure containing the integer value. See doc: http://msdn.microsoft.com/en-us/library/1t3y8s4s.aspx and http://msdn.microsoft.com/en-us/library/b3h38hb0.aspx

So simply declare the structure as you did and also declare the other parameters and declare them as null. This is important because the Null of WinDev will send a Null, but you must send a Nullable structure containing a Null value.

You are almost there.

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 02.09.2014 13:12
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.