Highlighted
Frequent Contributor.
Frequent Contributor.
1064 views

Getting General run Error while opening connection for teradata using UFT(error number :-2147467259)

Hi,

I am faacing the General error while opening the connection for teradata. Please find the below code.

Please help me to resolve this issue. Thanks in Advance.

 

first I have created ODBC connection for Teradata then write code for execute query for teradata

------UFT Code---

Set cnDatabase = CreateObject("ADODB.Connection")

cnDatabase.CommandTimeOut=600000

' Note: DSNTeradata is my ODBS DSN Name

cnDatabase.ConnectionString="Data Source=DSNTeradata;Database=myDB;Persist Security Info=True;User Id=Tester1;Password=tester123;Session Mode=ANSI;"

cnDatabase.Open

Set ObjRecSetData = cnDatabase.Execute("select * from logtable")

------Code end-------

When cnDatabase.Open command run then throwing "General run error" Error number is :-2147467259.

Please let me know what is wrong in my code. please help

0 Likes
9 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: Getting General run Error while opening connection for teradata using UFT(error number :-2147467

Sounds like you might not have an ODBC driver installed on your execution machine,

Mark Smith.

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Getting General run Error while opening connection for teradata using UFT(error number :-2147467

Thanks Mark for acknowledge.

ODBC driver installed on my VDI and also created the System DSN. Please find the attached screen shot for the same.

Please help me.

Thank You,

Regards,

Pradeep Patil

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Getting General run Error while opening connection for teradata using UFT(error number :-2147467

Are you able to connect to the Teradata DB using some other method other than UFT (DB connection app, VBscript etc)?

Mark Smith.

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Getting General run Error while opening connection for teradata using UFT(error number :-2147467

Yes Mark, I am able to connect Teradata base using Teradata Studio tool.

Thanks

Pradeep Patil

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Getting General run Error while opening connection for teradata using UFT(error number :-2147467

hi, Pradeep 

Will you please attach a screen snapshot of the DSN? Maybe the Taradata studio is using non-standard way to retrieve the data. 

In any case, as Mark suggested also, will you check connecting outside UFT using VBScript alone? Though I guess you'll get the same result.

Thanks.

James

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Getting General run Error while opening connection for teradata using UFT(error number :-2147467

Hi James,

Please find the attached screen shot for DSN created for Teradata.

I will try using Java, So please let me know which jar file need the same and also let me know How I can verify Teradata ODBC driver successfully installed or not.

Note: I am working on Windows 7 Enterprise 64 bit OS. 

Thank You,

Regards,

Pradeep Patil

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Getting General run Error while opening connection for teradata using UFT(error number :-2147467

hi,

Check the code sample here for a Java application to access ODBC.

http://www.java2s.com/Code/Java/Database-SQL-JDBC/SimpleexampleofJDBCODBCfunctionality.htm

Thanks.

James

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Getting General run Error while opening connection for teradata using UFT(error number :-2147467

Hi James,

I have reached Teradata team and discuss this issue with them via Post tool, they ask me verify ODBC setup using using their utility and I have tried and connected Teradata successfully. So why not able to connect via UFT using DSN string. please help/support what is wrong in my code. Please refer the attached screen shot Taradata connection success via Teradata utility. I have used 32 bit utility to verify ODBC setup.

Note: we are using licensed UFT version please help us proper support channel for the same so this issue resolved quickly and unblocked our automation activity.

Thanks,

Regards,

Pradep Patil

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Getting General run Error while opening connection for teradata using UFT(error number :-2147467

hi, Pradep Patil

As mentioned earlier, have you tried using Java standard code to access the ODBC DSN you created? I mean, it is very reasonable that Teradata utility can access and utilize Teradata DSN, or it should be a problem with their utility. However, it is not guaranteed the same DSN is available to another program.  Please do this favor, validate the DSN with a 3rd party program, not Teradata, not UFT, and see if it's working. 

If the Java code works, or in any case it's urgent to have a solution, please raise a support ticket to Microfocus. 

Thank you.

James

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.