Showing posts with label codecon. Show all posts
Showing posts with label codecon. Show all posts

Friday, February 10, 2012

Can not open database requested. Login fails

Hallo:
Trying to connect to database using OLE DB. Gave the
following code:
con.ConnectionString="Provider=sqloledb;"&_
"Data Source=ServerName;Initial Catalog=DatabaseName;"&_
"Integrated Security=sspi;Trusted_Connection=yes;"
con.Open
Getting error message:
Microsoft OLEDB Povider for SQL Server(0x80004005).Can not
open database requested in login 'user'.Login fails.
Any solution please.
Thanks.
tinku
Tinku,
May be the database has been deleted.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"tinku" <ritadi2002@.yahoo.com> wrote in message
news:1d3ab01c42351$efa2bf00$a301280a@.phx.gbl...
> Hallo:
> Trying to connect to database using OLE DB. Gave the
> following code:
> con.ConnectionString="Provider=sqloledb;"&_
> "Data Source=ServerName;Initial Catalog=DatabaseName;"&_
> "Integrated Security=sspi;Trusted_Connection=yes;"
> con.Open
> Getting error message:
> Microsoft OLEDB Povider for SQL Server(0x80004005).Can not
> open database requested in login 'user'.Login fails.
> Any solution please.
> Thanks.
> tinku
>
|||Dinesh,
It is an existing database and after adding user to the database the
problem got solved. Thank you for your e-mail.
Tinku
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

Can not open database requested. Login fails

Hallo:
Trying to connect to database using OLE DB. Gave the
following code:
con.ConnectionString="Provider=sqloledb;"&_
"Data Source=ServerName;Initial Catalog=DatabaseName;"&_
"Integrated Security=sspi;Trusted_Connection=yes;"
con.Open
Getting error message:
Microsoft OLEDB Povider for SQL Server(0x80004005).Can not
open database requested in login 'user'.Login fails.
Any solution please.
Thanks.
tinkuTinku,
May be the database has been deleted.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"tinku" <ritadi2002@.yahoo.com> wrote in message
news:1d3ab01c42351$efa2bf00$a301280a@.phx
.gbl...
> Hallo:
> Trying to connect to database using OLE DB. Gave the
> following code:
> con.ConnectionString="Provider=sqloledb;"&_
> "Data Source=ServerName;Initial Catalog=DatabaseName;"&_
> "Integrated Security=sspi;Trusted_Connection=yes;"
> con.Open
> Getting error message:
> Microsoft OLEDB Povider for SQL Server(0x80004005).Can not
> open database requested in login 'user'.Login fails.
> Any solution please.
> Thanks.
> tinku
>|||Dinesh,
It is an existing database and after adding user to the database the
problem got solved. Thank you for your e-mail.
Tinku
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!