Error: (MEMO) Displayed instead of field info

TeeChart for ActiveX, COM and ASP
Post Reply
LS
Newbie
Newbie
Posts: 5
Joined: Fri Nov 15, 2002 12:00 am

Error: (MEMO) Displayed instead of field info

Post by LS » Fri Mar 12, 2004 11:56 pm

I am retrieving data from an Access database and in some instances the x-axis displays MEMO instead of the field information in the database. Everything worked just fine for a few months and then it started happening every time! :cry: Any suggestions? Anyone seen this before?

Thanks,
BIT

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Mar 15, 2004 11:31 am

Hi,

have you defined a correct XLabelSource. Could you please post and example in the steema.public.attachments newsgroup with which I can reproduce the problem "as is" here ?

LS
Newbie
Newbie
Posts: 5
Joined: Fri Nov 15, 2002 12:00 am

Post by LS » Tue Mar 30, 2004 5:47 am

Can you please give me an example with the following specs?

Bar graph with 2 bar series. Each name has a score for each of the 2 bar series and only one x-axis label (name)

X-axis label: Name (type string)
X-axis bar: Score (type integer)


I wasn't able to figure out how to set the bar and label values for the axis, so what I would do so far, I would connect to one of my databases in design time by creating a Dataset and then set the bar and label values in design time. Then I would delete the Dataset and switch the Data Source to Random. This caused the info to appear just like I wanted on the bar graphs. For some reason, some computers running both 98, 2000, and XP, won't retrieve the Name field from the database in design time and this causes the MEMO to appear (during run time) as the x-axis label instead of the students' names. I had a chance to work on a machine that presented this problem today. That's when I saw that the Dataset that I would create in design time would not retrieve the Name field from the database. This is only an issue on some machines.

This is the connection string:

"DBQ=" & gstrConnectionPath & ";DefaultDir=" & gstrConnectionPath & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;PWD=" & gstrDBPass & ";SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;"

This is the code:

adoChart.ConnectionString = gstrConnectionString
adoChart.RecordSource = "Select FullName, Score, ScoreWReward From [Scores of Students] WHERE TeacherAutoNum = " & _
mstrTeacherID & " AND Grade = '" & mstrGrade & "' AND AssessmentSkillAutoNum = " & _
mstrSelectedTest & " AND Date = #" & adoTestInfo.Recordset.Fields("Date") & "# " & _
" AND Score <> NULL ORDER BY Score Desc, ScoreWReward Desc, FullName Asc"
adoChart.Refresh

With TChart1
With .Series(0)
.DataSource = adoChart.Recordset
.RefreshSeries
.Active = True
End With

With .Series(1)
.DataSource = adoChart.Recordset
.RefreshSeries
.Active = True
End With
End With


This was all the code I needed to show the info I wanted on the graph during run time. I think if I just have an example of assigning values from a database to the bars of series and labels to the axis in code, it would probably solve this problem.

Thanks in advance!

LS
Newbie
Newbie
Posts: 5
Joined: Fri Nov 15, 2002 12:00 am

Post by LS » Fri Apr 02, 2004 9:12 pm

Do I need to clarify something? I'd like to know whether I can correct this problem otherwise I'll just have to find a new graphing control. Please advice me on the status of this issue.

Thanks,
BIT

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Apr 05, 2004 7:53 am

Hi --
Do I need to clarify something? I'd like to know whether I can correct this problem otherwise I'll just have to find a new graphing control. Please advice me on the status of this issue.
I have attached an example I hope you will find useful to:
news://www.berneda.com/steema.public.attachments
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

LS
Newbie
Newbie
Posts: 5
Joined: Fri Nov 15, 2002 12:00 am

Post by LS » Tue Apr 06, 2004 7:10 am

Chris, thanks for providing an example. I'm using ver. 5 of the TeeChart and the example you provided is with ver. 6. I'll try to use it with the version I have. I'll let you know how it goes.

Thanks,
BIT

Post Reply