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
Error: (MEMO) Displayed instead of field info
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 ?
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 ?
Pep Jorge
http://support.steema.com
http://support.steema.com
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!
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!
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
news://www.berneda.com/steema.public.attachments
I have attached an example I hope you will find useful to: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.
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/
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/