Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » size of S_XXX struct members
Re: size of S_XXX struct members [message #41665 is a reply to message #41649] Wed, 08 January 2014 12:05 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14265
Registered: November 2005
Ultimate Member
Alboni wrote on Tue, 07 January 2014 16:53

Being able to do something like this would be grand also:

S_PAYMENT_METHOD rec;
int n=rec.GetCount();
for (int i=0; i<n; i++)
{
	switch (rec[i].type)
	{
		case S_INT: DoSomethingWithAnInt(rec[i].Value, rec[i].MaxLength); break;
		case S_STRING: DoSomethingWithAnString(rec[i].Value, rec[i].MaxLength); break;
		................
	}
}



This is actually already possible; rec has GetRef method and Ref has GetType or even Is<> methods...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: testing out firebird in bazaar missing ibase.h
Next Topic: firebird with sqlarray ctrl (possible?)
Goto Forum:
  


Current Time: Mon Jul 07 13:23:57 CEST 2025

Total time taken to generate the page: 0.03569 seconds