Page 1 of 1
Error: (MEMO) Displayed instead of field info
Posted: Fri Mar 12, 2004 11:56 pm
by 6922953
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!
Any suggestions? Anyone seen this before?
Thanks,
BIT
Posted: Mon Mar 15, 2004 11:31 am
by Pep
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 ?
Posted: Tue Mar 30, 2004 5:47 am
by 6922953
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!
Posted: Fri Apr 02, 2004 9:12 pm
by 6922953
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
Posted: Mon Apr 05, 2004 7:53 am
by Chris
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
Posted: Tue Apr 06, 2004 7:10 am
by 6922953
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