Jump to content
Software FX Community

How to connect to ADO resultset with VC6 ?


User (Legacy)

Recommended Posts

Hi,

Now, I know the usage of connecting to ADO with VB from ChartFX's sample.

But, in VC6, how can I use ADO ?

So if someone could help me, thanks

in VB

'Create variables for ADO Connection and Resultset

Dim Conn As New ADODB.Connection

Dim RS As ADODB.Recordset

'Create variable to hold the Chart FX Default Data provider

Dim CfxData As Object

'Open the DSN

Conn.Open "CfxData"

'Execute SQL and obtain resultset

Set RS = Conn.Execute("SELECT * FROM Types")

'Create Ado object from the Chart FX Resultset

Set CfxData = CreateObject("CfxData.Ado")

'Assign the resultset to the ChartFX Data Provider

CfxData.ResultSet = RS

'Let Chart FX take information from the data provider

ChartFX1.GetExternalData CfxData

in VC ?

Link to comment
Share on other sites

I found the solution in Software FX's KB (support.softwarefx.com/chartfx)

See Q1381037

^_^

"bluejack" <bluejack@dreamwiz.com> wrote in message

news:iRAVltSmDHA.1244@WEBSERVER1...

> Hi,

>

> Now, I know the usage of connecting to ADO with VB from ChartFX's sample.

> But, in VC6, how can I use ADO ?

> So if someone could help me, thanks

>

>

> in VB

>

> 'Create variables for ADO Connection and Resultset

> Dim Conn As New ADODB.Connection

> Dim RS As ADODB.Recordset

> 'Create variable to hold the Chart FX Default Data provider

> Dim CfxData As Object

>

> 'Open the DSN

> Conn.Open "CfxData"

>

> 'Execute SQL and obtain resultset

> Set RS = Conn.Execute("SELECT * FROM Types")

>

> 'Create Ado object from the Chart FX Resultset

> Set CfxData = CreateObject("CfxData.Ado")

>

> 'Assign the resultset to the ChartFX Data Provider

> CfxData.ResultSet = RS

>

> 'Let Chart FX take information from the data provider

> ChartFX1.GetExternalData CfxData

>

> in VC ?

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...