Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 17 Mar 2006 @ 18:44:32 GMT


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


Subj:   Re: Sample odbc application
 
From:   Greene, Thomas

Looks to me like your connection string is wrong. Try something like this:

     'Build a connection string that does not require a DSN defined
     on the system.
     'Make sure that lob support and encryption are enabled.
     conn.ConnectionString = _
         "Driver=Teradata;" & _
         "DBCNAME=thebigbox;" & _
         "UID=dbc;" & _
         "PWD=dbc;" & _
         "DATABASE=dbc;" & _
         "AUTHENTICATION=TD2;" & _
         "USENATIVELOBSUPPORT=Y;" & _
         "DATAENCRYPTION=Y"

     conn.ConnectionTimeout = 600
     Debug.WriteLine("connection string: " & conn.ConnectionString)
     Debug.WriteLine("connection timeout: " & conn.ConnectionTimeout)
     Debug.WriteLine(" ")
     Try
         Debug.WriteLine("connecting to database ")
         conn.Open()
         Debug.WriteLine("connect success")
         Debug.WriteLine("Connection ServerVersion: " &conn.ServerVersion)
            Debug.WriteLine("Connection State: " & conn.State)
            Debug.WriteLine("Connection Database: " & conn.Database)
            Debug.WriteLine(" ")

        Catch ex As Exception
            Console.WriteLine("Exception Detected")
            Console.WriteLine("Generic Exception Handler: {0}", ex.ToString())

        Finally
            Debug.WriteLine("disconnecting from database")
            conn.Close()
            Debug.WriteLine("disconnect complete")
        End Try


     
  <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