Results 1 to 13 of 13

VBA - Problem getting data from Oracle server using SQL query with Recordset

Threaded View

Dapos VBA - Problem getting data... 07-16-2012, 04:18 AM
JosephP Re: VBA - Problem getting... 07-16-2012, 04:56 AM
Dapos Re: VBA - Problem getting... 07-16-2012, 05:09 AM
JosephP Re: VBA - Problem getting... 07-16-2012, 05:11 AM
Dapos Re: VBA - Problem getting... 07-16-2012, 06:13 AM
JosephP Re: VBA - Problem getting... 07-16-2012, 06:19 AM
Dapos Re: VBA - Problem getting... 07-16-2012, 06:30 AM
JosephP Re: VBA - Problem getting... 07-16-2012, 06:39 AM
Dapos Re: VBA - Problem getting... 07-16-2012, 06:57 AM
JosephP Re: VBA - Problem getting... 07-16-2012, 07:04 AM
Cutter Re: VBA - Problem getting... 07-16-2012, 09:19 AM
Dapos Re: VBA - Problem getting... 07-16-2012, 04:13 PM
Cutter Re: VBA - Problem getting... 07-16-2012, 09:58 PM
  1. #1
    Registered User
    Join Date
    07-16-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    6

    VBA - Problem getting data from Oracle server using SQL query with Recordset

    Hi,

    Newbie to form. I'm using ADODB and recordset with SQL to get data from an Oracle server. I can get the data but for some reason it's only pulling the first field from the database. I've been using a watch on rst.fields to see what i'm retrieving. Any ideas?

    Dim Cnt As New ADODB.Connection
    Dim rst As New ADODB.Recordset
    dim glob_oracleConnect as string
    dim ID_ref as string
    
     glob_oracleConnect= "Provider=msdaora.1;Data Source=xxxxx;User Id=xxxm;Password=xxx;"
    
    ID_ref = "DN001"
    
    SQLString = "SELECT * FROM ATOLLADMINUMTS.CDMACELLS "
    
    
    'Open connection to the database
    Set Cnt = New ADODB.Connection
    Cnt.Open glob_oracleConnect
    
    'Open recordset based on Orders table
    rst.CursorType = adOpenDynamic
    rst.CursorLocation = adUseClient
    rst.LockType = adLockOptimistic
    
    rst.Open SQLString, Cnt, , , adCmdText
    Last edited by Cutter; 07-16-2012 at 09:16 AM. Reason: Added code tags

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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