Results 1 to 1 of 1

Below code is retrieving some columns data as ??? marks when Nonenglishcharacters exists

Threaded View

pd52298 Below code is retrieving some... 05-08-2013, 07:07 AM
  1. #1
    Registered User
    Join Date
    05-08-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    1

    Below code is retrieving some columns data as ??? marks when Nonenglishcharacters exists

    Below code is retrieving some columns data as ??? marks when Nonenglishcharacters exists


    Dim oCon1: Set oCon1 = CreateObject("ADODB.Connection")
    Dim oRs1: Set oRs1 = CreateObject("ADODB.Recordset")
    
    Dim strCon1
    'Oracle ODBC Driver 11.2.0.3.0
    strCon1 = "Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XXXXXXXXXXXXXX)(PORT=XXX))(CONNECT_DATA=(SID=XXXXXX)));Uid=XXXX;Pwd=XXXX;"
    oCon1.ConnectionString = strCon1
    
    
    can you please help me with you solution to extract exact data
    
    
    
    oCon1.Open
    Query1 = Sheets("Query").Cells(1, 1).Value
    Set oRs1 = oCon1.Execute(Query1)
    STG_CAMT052.Activate
    For colIndex = 0 To oRs1.Fields.Count - 1
            STG_CAMT052.Cells(1, colIndex + 1) = oRs1.Fields(colIndex).Name
        Next
    'Cells(2, 1).CopyFromRecordset oRs1
    oCon1.Close
    
    
    
    
    oCon1.Open
        
        Query1 = Sheets("Query").Cells(1, 1).Value
        Set oRs1 = oCon1.Execute(Query1)
        STG_CAMT052.Activate'(it activates the sheet)
        Cells(2, 1).CopyFromRecordset oRs1
        
    oCon1.Close
    Last edited by arlu1201; 05-08-2013 at 07:44 AM. Reason: Use code tags in future.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1