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
 Strings to Dataset?

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
billyrainbow Posted - 09/19/2007 : 04:06:41 AM
Origin Version (Select Help-->About Origin): 7.0303
Operating System: Windows 2000

Hello,

I wrote a little programm in Origin C to import data from a textfile (no CSV!). I would like to add as first column a row for dates in string format, but when i execute the loop

if (i==6)
{
string y = row.GetToken(0,' ');
string m = row.GetToken(1,' ');
string d = row.GetToken(2,' ');
string date;
date.Format("%s.%s%s",d,m,y);

for (u=0; u<120; u++)
{
dsDate[u] = date; // ERROR (-->Dataset dsDate !!)
}
}

the error message "Run-Time Error in Origin C funktion, unknown error"
occurs.
Is it possible, that Datasets don't accept strings? If this is the Problem, does anyone know an alterative method to add values to columns without Datasets? I know that it works manually, but i really would like to have it made in a loop...

Thank you in advance,
Marion.



Edited by - billyrainbow on 09/19/2007 04:09:39 AM
2   L A T E S T    R E P L I E S    (Newest First)
billyrainbow Posted - 09/20/2007 : 05:44:17 AM
Thanks a lot !!!
Things can be so simple sometimes... ;)
Mike Buess Posted - 09/19/2007 : 08:51:31 AM
Dataset cannot be string but you can use Worksheet::SetCell to set the column cells directly.

Mike Buess
Origin WebRing Member

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