DataRecordSet Example

Are there any examples of using DataRecordSet?

I have a Visio Diagram linked to an SQL database. I'd like to be able to update the select query (Command) and refresh the Diagram.

In VBA I use the following:

DiagramServices = ActiveDocument.DiagramServicesEnabled
ActiveDocument.DiagramServicesEnabled = visServiceVersion140

ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI; Blah Blah Blah...
CommandString = "SELECT Blah Blah Blah...

Set Rs = Application.ActiveDocument.DataRecordsets(1)
Rs.DataConnection.ConnectionString = ConnectionString
Rs.CommandString = CommandString
Rs.Refresh
ActiveDocument.DiagramServicesEnabled = DiagramServices

Thanks in advance ~ Dean

Hi Dean,

Sorry for the late reply. Some important features were included in the latest release and this issue needed to be analyzed.

You can use the following code to update connection string and query.

Dim diagram As Diagram = New Diagram("Drawing1.vsd")
diagram.DataConnections(0).ConnectionString = "Connection string goes here"
diagram.DataConnections(0).Command = "select bla bla bla`"
diagram.Save("Drawing1.vdx", SaveFileFormat.VDX)

Regarding refreshing data in the record set, this feature is not available at the moment but a request in this regard has been logged into our issue tracking system as DIAGRAM-33137. We will keep you updated on this issue in this thread.

Please feel free to contact us in case you have further comments or questions.

Best Regards,

Hi

Has there been any progress with this request?

Cheers

Hi Dean,

This issue has been planned for 2.3.0 release. We will let you know once it is resolved. Sorry for the inconvenience.

Please feel free to contact us in case you have further comments or questions.

Best Regards,

Hi Muhammad

Has this feature been added to 2.5.0? Is there a code sample of how to use it?

Cheers

Dean

Hi Dean,

Based on the complexity and demand of this issue, it was shifted to 2.8.0 release (October 2012) plan. Now we have also raised the priority of this issue and let you know as soon as the issue is fixed. We are extremely sorry for the inconvenience.

Best Regards,

Hi Muhammad

Thanks for the update, I look forward to using this feature when it's avaialable.

Cheers

Dean

The issues you have found earlier (filed as DIAGRAM-33137) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.