All Forums Connectivity
sal21 8 posts Joined 01/13
27 Jan 2013
list database and related table in Teradata with vb6

How to, is possible?
tks.

sal21 8 posts Joined 01/13
21 Jan 2014

SORRY FOR UP...:-)

Raja_KT 1246 posts Joined 07/09
21 Jan 2014

Yes it is possible. All you need to do is put your query in the code after connecting. I took one sample code( I dont have env to test and you have to make changes accordingly if need be) from net and paste here. 
 
Query is : SELECT databasename,tablename from dbc.tables

Dim cnt As ADODB.Connection 

Dim rst As ADODB.Recordset 

Dim stSQL As String 

Dim StCon as String 

 

Const stCon As String = "DSN=xxx;Uid=' " & ccccc & " '; Pwd' " & zzzzz & "';" 

 

Set cnt = New ADODB.Connection 

Set rst = New ADODB.Recordset 

cnt.ConnectionString = stCon 

cnt.Open 

 

stSQL = "SELECT databasename,tablename from dbc.tables" 

 

 

 

rst.Open stSQL, cnt, adOpenDynamic, adLockReadOnly 

 

if rst.recordcount > 0 or not rst.eof then 

 

rst.MoveFirst 

 

 

do while not rs.eof 

.......

rst.movenext 

loop 

 

rst.Close 

 

cnt.Close 

 

Hope it helps.

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.