August 24, 2011 at 4:16 am
Dear Steave,
I am facing one problem with SQL connectivity from the application. Please guide me the same.
Details as follows:
1. Operating system is Win 2008, 64 Bit
2. SQL 2008 R2
3. Tried to connect SQL with ODBC and Management Studio, it is connecting fine
4. But when i am trying to connect the SQL from my VB application it is failing and showing the error (Database connection failed)
Run time error 2147467259 - 80004005 [DBNMPNTW] Access denied
5. Then we have stopped all SQL 2008 services and installed SQL 2005 express then also data base connection failing (but connecting ODBC and MSMS)
what could be the reason and what is the solution for the same?
Please check and suggest for same
August 24, 2011 at 7:46 am
There is very little information in your post so I am speculating but that sounds like a permissions issue. Check your connection string and make sure the user has access to the database you are trying to connect to. If you google the error message you posted there are lots of people that have run into this issue and there a lot of reasons but they all appear to be related to permissions.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 24, 2011 at 9:27 am
Hi Sean Lange
Logged user was Administrator and having full rights, from VB applciation SQL is not connecting and showing above mentioned error but from .net application SQL is connecting properly.
Any solutions plz...
August 24, 2011 at 9:34 am
Try changing your connection string to use SQLNCLI (SQL Native Client).
Post your connection string.
Also check to see what the users default DB is. Some people set a default DB to a blank DB for security purposes but forget to grant rights into that DB.
August 24, 2011 at 9:38 am
Tried the same (SQLNCLI) but no use. Also default db is master.
Actual my problem is from any VB application I am not able to connect the database but from .Net application can able to connect the db
August 24, 2011 at 9:48 am
Post your connection string. Just change the server name, IP address, db name and credentials.
From the PC you are trying to connect with, can you connect using a UDL or local systen DSN?
August 24, 2011 at 9:56 am
Tried both Connection strings
PROVIDER=SQLOLEDB;SERVER=SERVER\SERVER;UID=sa;PWD=P@ssw0rd;DATABASE=MASTER
PROVIDER=SQLNCLI10;SERVER=SERVER\SERVER;UID=sa;PWD=P@ssw0rd;DATABASE=MASTER
Also DSN is working fine, only connecting from VB 6.0 is failing
Any idea ?
August 24, 2011 at 10:19 am
It might also be that the connectivity drivers are not installed on your machine.
August 25, 2011 at 6:06 am
Problem is not solved. Any Suggestions....
August 25, 2011 at 6:23 am
not without seeing your current error message.
August 25, 2011 at 8:43 am
Run time error 2147467259 - 80004005 [DBNMPNTW] Access denied
while connecting the Database Server from VB application
August 25, 2011 at 8:52 am
The connection string is fine. You need to give the correct permissions to the user you are trying to connect with.
March 6, 2014 at 3:28 pm
Provider=SQLOLEDB.1;Data Source=
March 6, 2014 at 3:38 pm
Raamamohan (8/25/2011)
Run time error 2147467259 - 80004005 [DBNMPNTW] Access deniedwhile connecting the Database Server from VB application
Do SSMS, .net application and VB application are on the same server or on different ones ?
--
SQLBuddy
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply