You must Sign In to post a response.
  • Category: .NET

    Hi to all ,how can write these below vb6 statements into c# language.

    VB6 STATEMENTS:

    Dim oStream As New ADODB.Stream
    Dim objContext As COMSVCSLib.ObjectContext
    Dim xmlDoc As New MSXML.DOMDocument
    Dim sQuery As String
    Dim rst As New ADODB.Recordset
  • #587572
    Hi,

    See the below conversion:

    1. Dim oStream As New ADODB.Stream

    using System.IO;
    StreamReader rd = new StreamReader();

    2. Dim xmlDoc As New MSXML.DOMDocument

    Include: using System.Xml;
    XmlDocument doc=new XmlDocument();

    3. Dim sQuery As String
    String sQuery;

    4. Dim rst As New ADODB.Recordset

    Need to add: using System.Data.SQLClient;
    SqlDataReader dr = new SqlDataReader();

  • #587751
    try this code


    ADODB.Stream oStream = new ADODB.Stream();
    COMSVCSLib.ObjectContext objContext = default(COMSVCSLib.ObjectContext);
    MSXML.DOMDocument xmlDoc = new MSXML.DOMDocument();
    string sQuery = null;
    ADODB.Recordset rst = new ADODB.Recordset();




    hope this will help you


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.