Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 05 Nov 2003 @ 18:09:59 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   VB, ADO and ODBC
 
From:   Patrick Hatcher

Sorry if this question has been asked before:

Using
ODBC v3.00.01.00
Visual Basics 6

For some reason, when I run my query from my VB app, I get no data using the above ODBC driver. If I run the exact same program on a machine with ODBC v2.04.00.00 it works fine. Any suggestions on how to get this driver to work?

Here's my code:

'----Start Code
Dim RS_ddw As ADODB.Recordset
Dim CN_ddw As ADODB.Connection
Dim strSQL as String

Set CN_ddw = New ADODB.Connection

CN_ddw.ConnectionString = "DSN=DDW_DW;user=SOME_USER;pwd=SOME_PWD"
CN_ddw.Open

Set RS_ddw = New ADODB.Recordset

strSQL = "Select * from item where dept = 10"
Set RS_ddw = CMD.Execute(strSQL)

'Also tried but still no data
'RS_ddw.Open strSQL, CN_ddw

Do While Not RS_ddw.EOF
  'Do some stuff here
Loop

  RS_ddw.Close
  CN_ddw.Close

'---END Code

TIA

Patrick Hatcher



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023