Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql server connection

Status
Not open for further replies.

powerpc

Programmer
Mar 10, 2003
6
0
0
US
when Iam trying to connect by using following connection string it is gin=ving error "server not existing or aceess denied".may I know the error pl.
-------------------------------------------
myconn = New SqlClient.SqlConnection("Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=pubs;Data Source=prasad")

mycommand = New SqlClient.SqlDataAdapter("select * from Authors", myconn)
--------------------------------------------------
thanks
 
Looks like the password is missing from the connection string.
 
Ditto the password. I would use a different account for just selecting too.
 
I think .NET doesn't use the "provider" part of the connection string if you're using the Sql provider (SqlConnection vs. OleDbConnection)

Chip H.
 
Thanks Friends
I got it by giving the connection as "Data Source=powerpc;Integrated Security=SSPI;Initial Catalog=pubs" and I created new login name as
powerpc/aspnet in sql server prevously it gives the
error as "login denied ".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top