473,383 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

cannot open database

i am doin project using vb.net 2005 and using this sql query for connection
sql = "select username from login order by username"
con.ConnectionString = "Data Source=" & hostname & "; Initial Catalog=college;integrated security=sspi"
but m getting the following error:
Cannot open database "college" requested by the login. The login failed.
Login failed for user 'CI4\Admin'.
Nov 17 '09 #1
7 2066
MrMancunian
569 Expert 512MB
Does 'CI4\Admin' have access to your database? And do you realize that in the piece of code you posted, the sql query (sql = "select username from login order by username") isn't executed?

Steven
Nov 17 '09 #2
tlhintoq
3,525 Expert 2GB
@Ashlesha pude
That's a description of conditions. What is your QUESTION?
Nov 17 '09 #3
yss (sql = "select username from login order by username") isn't executed.
CI4 is the newly changed computer name and it cant access database
Nov 17 '09 #4
MrMancunian
569 Expert 512MB
@Ashlesha pude
So, perhaps that is the reason the login failed?

Steven
Nov 17 '09 #5
MrMancunian
569 Expert 512MB
ROFL, didn't even see that...Well, you've got to give him credit for doing some more explaining :-p

Steven
Nov 17 '09 #7
Frinavale
9,735 Expert Mod 8TB
Please take a look at the article called How to use a database in your program for an example of how to create an SQL query using parameters.

-Frinny
Nov 19 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Nand Belani | last post by:
Hi, I have a MS Access 2000 database on the network, it is secured and the mdw file is on the network. The database works for most of the users on the network, but does not open for two of the...
0
by: Mr.KisS | last post by:
Hello. I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005 Express. When i try to open a connexion with : <connectionStrings> <add name="AppCnxStr"...
2
by: Mr.KisS | last post by:
Hello. I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005 Express. When i try to open a connexion with : <connectionStrings> <add name="AppCnxStr"...
10
by: vvenk | last post by:
Hello: When I tried to use an Access database, I get the following exception: Server Error in '/WebGrid' Application....
2
by: Enska | last post by:
I have problems connecting my access database I get information .. I cant use my database and I'm administrator on my computer so permission shutnot bee problem, but I dont know Where is the...
1
by: bennett | last post by:
I'm trying to write an ASPX page that uses an OleDbDataAdapter to get data from a SQL Server database. When I test the connection, it returns success, and when I preview the data using the...
4
by: snow | last post by:
Hi all, I have a VB.net program installed in a xp home with sp2,after installation, get error "Cannot open a database from a previous version of your application. The database is a 97 Access...
1
by: martinbr_2000 | last post by:
I have an access database that has been split and resides in the network share. When the access database is currently being updated by someone, and I try to open the database, I cannot open the...
0
by: namrataa | last post by:
Cannot Open default database. Invalid login for \ -------------------------------------------------------------------------------- Hi, I have written services in WCF using C# and SQL Server...
3
by: Raymond Chiu | last post by:
Dear All, I have posted my question as below. But no answers, hope it can found here. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.