Micro Focus QTP (UFT) Forums
Unspecified error while connecting database - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Unspecified error while connecting database (/Thread-Unspecified-error-while-connecting-database)



Unspecified error while connecting database - kamalteja - 12-04-2012

Hi,

I'm getting unspecified error while opening a recordset and it is not happening for all the tables. The datatype used for tables are only INT, CHAR and VARCHAR. the only possibility i see is huge volume of data, but the error is thrown even for table with 4000 records. FYI .. password is not encrypted

Code:
Dim strConn      
strConn = "Driver= {Microsoft ODBC for Oracle}; " &_        
                  "ConnectString=(DESCRIPTION=" &_    
                  "(ADDRESS=(PROTOCOL=TCP)" &_    
                  "(HOST=) (PORT=1521))" &_        
                  "(CONNECT_DATA=(SERVICE_NAME=)));uid=; pwd=;"  
            
Dim obConnect  
Dim obRecset    
            
Set obConnect =CreateObject("ADODB.Connection")          
Set obRecset = CreateObject("ADODB.Recordset")  
            
obConnect.Open strConn


Dim queryStr      
queryStr = "select * from mv_product"        
            
Set obRecset = obConnect.Execute(queryStr)        


obRecset.MoveFirst        
            
GetDBField = obRecset.Fields(0).Value    
msgbox GetDBField