How to mention default database when using Teradata OLEDB provider for connection(DSN LESS).

Connectivity
Teradata Employee

How to mention default database when using Teradata OLEDB provider for connection(DSN LESS).

Hi,

I need to provide default database name in the connection string to connnect using Teradata OLEDB provider in ASP.Net.

Currently I am using following String:



in web.config.

But the problem is when I connect using this , I always get connected to Default Database mentioned example say if I have Databases X,Y,Z on same box and X database is set as default I am getting connected to X only while I want to connect to Y database.

Please help.
4 REPLIES
Teradata Employee

Re: How to mention default database when using Teradata OLEDB provider for connection(DSN LESS).

it seems the string missed.
here it is
add name="ConnectionString" connectionString="Provider=TDOLEDB.1;User ID=YYYYY;Data Source=Server Name; Persist Security Info=false;Password=YYYYYY;"
Teradata Employee

Re: How to mention default database when using Teradata OLEDB provider for connection(DSN LESS).

Change the connection string to

Provider=TDOLEDB.1;User ID=YYYYY;Data Source=Server Name; Persist Security Info=false;Password=YYYYYY;Default Database=Y;
Teradata Employee

Re: How to mention default database when using Teradata OLEDB provider for connection(DSN LESS).

I forgot to mention that all connection string attributes are listed in the "Using OLE DB Provider for Teradata" manual in Chpater 2 "Setting Provider String Attribute" section.
Teradata Employee

Re: How to mention default database when using Teradata OLEDB provider for connection(DSN LESS).

thanks.