The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 dataset<type>

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
5*10 Posted - 08/11/2005 : 10:20:27 AM
Origin Version (Select Help-->About Origin): OriginPro 7G
Operating System:Win 2000
Hi,
I have a little Problem with typing my Dataset.
In the Manual to the Programming guide is written, that it is possible to type a dataset to char.
The Progromming Guide is also able to compile an link it, but if I try to call this function followed message is plotted:

Warnung, Argumentfehler Datentyp
Laufzeitfehler in Origin C Funktion, allgemeiner Ausführungsfehler

i trie to translate it in english

warning argument failure in datatype
runtime error in origing c function, general ...failure

the code I compile is:

void test_schleife_File()
{
Worksheet wkstfa;
wkstfa.Create("0");
wkstfa.SetNumRows(500);
wkstfa.AddCol("File");
wkstfa.AddCol("Date");
wkstfa.AddCol("Time");
wkstfa.AddCol("Blq1");
wkstfa.AddCol("Blq2");
wkstfa.Columns(0).SetType(OKDATAOBJ_DESIGNATION_NONE);
wkstfa.Columns(1).SetType(OKDATAOBJ_DESIGNATION_NONE);
wkstfa.Columns(2).SetType(OKDATAOBJ_DESIGNATION_NONE);
wkstfa.Columns(3).SetType(OKDATAOBJ_DESIGNATION_NONE);
wkstfa.Columns(4).SetType(OKDATAOBJ_DESIGNATION_NONE);
wkstfa.Columns(0).SetFormat(OKCOLTYPE_TEXT_NUMERIC);
wkstfa.Columns(1).SetFormat(OKCOLTYPE_TEXT_NUMERIC);
wkstfa.Columns(2).SetFormat(OKCOLTYPE_TEXT_NUMERIC);
wkstfa.Columns(3).SetFormat(OKCOLTYPE_TEXT_NUMERIC);
wkstfa.Columns(4).SetFormat(OKCOLTYPE_TEXT_NUMERIC);
Dataset<char> dsFile(wkstfa, 0);
Dataset dsDate(wkstfa, 1);
Dataset dsTime(wkstfa, 2);
Dataset dsBlq1(wkstfa, 3);
Dataset dsBlq2(wkstfa, 4);
dsFile.SetSize(500);
dsDate.SetSize(500);
dsTime.SetSize(500);
dsBlq1.SetSize(500);
dsBlq2.SetSize(500);
}

I hope someone can help me!!
2   L A T E S T    R E P L I E S    (Newest First)
5*10 Posted - 08/12/2005 : 04:51:56 AM
Hi Easwar,

thank you for helping. It works.

greets 5*10

P.S. I think we will see (write) us here more often!!
easwar Posted - 08/11/2005 : 11:27:15 AM
Hi 5*10,

In order to write and read strings to/from a dataset column, you need to use a vector of type string and then use PutStringArray and GetStringArray methods.

For example:


Dataset dsFile(wks, 0);
StringArray sa(4);
// The above is same as vector<string> sa(4);

sa[0] = "File1";
sa[1] = "File2";
sa[2] = "File3";
sa[3] = "File4";

dsFile.PutStringArray(sa);



Easwar
OriginLab


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000