i want to bind MSChart to a recordset fields call Quantity(Y axis) and Year(X axis).....
how should i specify the datasrc, datafield, dataMember and dataFormatAs?????
Printable View
i want to bind MSChart to a recordset fields call Quantity(Y axis) and Year(X axis).....
how should i specify the datasrc, datafield, dataMember and dataFormatAs?????
I just created a table in SQLserver like this:
create table lahtest3( year int, quantity int)
go
insert into lahtest3 values( 1984, 5)
insert into lahtest3 values( 1985, 6)
insert into lahtest3 values( 1986, 4)
then I added a data environment to my vb 6 project
and added a command that is based on the following sql statement
select convert(varchar(10),year), quantity from lahtest3
It is important that the year is a character field! Otherwise the mschart control tries to be smart and interprets it in a way that creates crazy graphs.
Then I simply set Datasource to dataenvironment1 and Datamember to Command1.
And, without writing a single line of code I got a "nice" chart.
hai lothar...
thanks for the solution.. but when i tried it out at visual interdev, it keeps telling me that putting either dataEnviroment1 or connection1 or command1 or recordset1 as datasource is 'invalid property value'... do u have any idea about it?
Thanks for telling us, that you do that in an HTML page using interdev. Of course you cannot use the dataenvironment in an HTML page.
but in interdev, u can add dataenvironment too as what u did in visual basic... adding a data connection and data command is the same way we can do in visual basic...
sorry for the confusion just now...
>but in interdev, u can add dataenvironment too as what u did in visual basic
sure, that may work in server-side ASP processing, but I doubt that it will work in client-side HTMLpages.
ic.. then do u have any other suggestion???
oh ya, about the ADO problem that i post past few days, do u have any further idea about my doubt?
thanks again
1 suggestion: in your ASP (if you use one) you could create client-side JScript code for manipulating the ms chart properties.
may be there is an ActiveX Control that can be bound to an RDS object.
>oh ya, about the ADO problem that i post past few days, do u have any further idea about my doubt?
I don't remember.
ic.. thanks...
can u please check again.. there is a question call "ADO in ASP" posted by anonymous at 22/8....
>can u please check again.. there is a question call "ADO in ASP" posted by anonymous at 22/8....
I think, I've answered that one. You need to create an application in IIS. If Interdev doesn't do it for you, do it manually.
Or: don't use application vars if you use them only for connection strings. Use in include file instead. That's how I do it in my apps.
ic.. thanks for all
I have a problem
How do i call a sub procedure using RDS .. i know using ADo to call a sub procedure from oracle .. i am stuck to call a sub procedure using RDS .. pls reply .. it is urgent ..U can reply mr directly to [email protected]
or [email protected]
Positive answer expected and appritiated..
Vinod
Sorry .. I want to know that Can I use MSChart in VC ++;
if yes .. how ?