Jump to content
Software FX Community

How to connect to ADO resultset with VC6 ?


User (Legacy)
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...