DataRecordSet Example

Last post 04-02-2012, 7:47 AM by muhammad.ijaz. 3 replies.
Sort Posts: Previous Next
  •  02-01-2012, 6:16 AM 358627

    DataRecordSet Example .NET

    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

     

     
  •  02-10-2012, 9:17 AM 360750 in reply to 358627

    Re: DataRecordSet Example

    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,


    Muhammad Ijaz
    Support Developer, Aspose Sialkot Team
    Contact Us
    http://www.aspose.com
    Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  04-02-2012, 5:32 AM 372466 in reply to 360750

    Re: DataRecordSet Example .NET

    Hi

    Has there been any progress with this request?

    Cheers

     

     
  •  04-02-2012, 7:47 AM 372564 in reply to 372466

    Re: DataRecordSet Example

    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,


    Muhammad Ijaz
    Support Developer, Aspose Sialkot Team
    Contact Us
    http://www.aspose.com
    Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
View as RSS news feed in XML