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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Strings to Dataset?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

billyrainbow

Germany
Posts

Posted - 09/19/2007 :  04:06:41 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Mike Buess

USA
3037 Posts

Posted - 09/19/2007 :  08:51:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dataset cannot be string but you can use Worksheet::SetCell to set the column cells directly.

Mike Buess
Origin WebRing Member
Go to Top of Page

billyrainbow

Germany
Posts

Posted - 09/20/2007 :  05:44:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot !!!
Things can be so simple sometimes... ;)
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000