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 » ArrayCtrl, HeaderCtrl & GridCtrl » SqlCtrl accessing
SqlCtrl accessing [message #12884] Sun, 25 November 2007 10:07 Go to next message
alex100 is currently offline  alex100
Messages: 118
Registered: November 2007
Experienced Member
Hi,

I have an sqlctrl showing to columns of a database table (ID, NAME). It is showing 5000 rows of data.

How to I get the data from the second row, second column?

I trying this withoud success:

Value k(DBGrid.Get(1,1));
String s=k.ToString();
PromptOK(s);

or

Value k(DBGrid.Get(0,1));
String s=k.ToString();
PromptOK(s);



or

Value k(DBGrid.Get(1,0));
String s=k.ToString();
PromptOK(s);

Is this the right way? It seems to show always the value of the first column. How to get data from a Value Type?

Env: WinXP, upp 2007.1

Thanks
Alex

Re: SqlCtrl accessing [message #12900 is a reply to message #12884] Mon, 26 November 2007 22:20 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
alex100 wrote on Sun, 25 November 2007 04:07

Hi,

I have an sqlctrl showing to columns of a database table (ID, NAME). It is showing 5000 rows of data.

How to I get the data from the second row, second column?

I trying this withoud success:

Value k(DBGrid.Get(1,1));
String s=k.ToString();
PromptOK(s);

or

Value k(DBGrid.Get(0,1));
String s=k.ToString();
PromptOK(s);



or

Value k(DBGrid.Get(1,0));
String s=k.ToString();
PromptOK(s);

Is this the right way? It seems to show always the value of the first column. How to get data from a Value Type?

Env: WinXP, upp 2007.1

Thanks
Alex




Alex, hard to say - too little info provided. Also, I believe you mean "SqlArray", not "SqlCtrl".

Please, the best way how to get a good reply to the question, or U++ bug or issue fixed, is to provide a "testcase" - a .zip compressed package as attachment that others can compile and test.

In more simple cases, quoting the code would do as well.

In this particular case, I would need at least to see how you have constructed your SqlArray(?) and how did you fetched the data.

Mirek
Re: SqlCtrl accessing [message #12901 is a reply to message #12900] Mon, 26 November 2007 22:22 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
P.S.: ArrayCtrl::Get(1, 1) reads from second row, but second "index". It does not necessarily have to correspond to second column. Some indexes do not have assigned columns, some indexes can be in more than single column etc...
Previous Topic: Howto: Row Aggregation for ArrayCtrl
Next Topic: The DataPusher(?) does not show up
Goto Forum:
  


Current Time: Mon Apr 29 02:04:14 CEST 2024

Total time taken to generate the page: 0.07891 seconds