473,327 Members | 1,892 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,327 software developers and data experts.

Problems in connecting to Sql server 2005

375 256MB
Hi,
I am trying to connect vb.net 2005 to sql server 2005
But i just cannot login. Its giving me an eroor stating that login failed. I have not used any password(because i do not have any) I use windows authentication.

But i would like to add here that when i click on server explorer(right side). i cannot view my sql server but if i write my username on it then my databases do appear.

where does the problem lie?

Any one please...

thanks




=======

in fact i tried out now it works in vb.net but not in asp,net
here's the coding for vb.net
MyCon = New SqlConnection("server=111.111.1.111;uid=;pwd=;data base=demo")
MsgBox("open")


Any help please
Jul 31 '07 #1
2 971
Plater
7,872 Expert 4TB
Well I don't think that is a valid connection string for one thing.
(See http://www.connectionstrings.com/ for correct forms)

Do all the correct users have login rights to the SQL server?
ASP.NET will probably need the ASP_NET user or (IUSER depending) to have login rights on the SQL server
Jul 31 '07 #2
cmrhema
375 256MB
Well I don't think that is a valid connection string for one thing.
(See http://www.connectionstrings.com/ for correct forms)

Do all the correct users have login rights to the SQL server?
ASP.NET will probably need the ASP_NET user or (IUSER depending) to have login rights on the SQL server
Plater, thanks for your response
got connected
Expand|Select|Wrap|Line Numbers
  1. SqlConnection MyCon = new SqlConnection("Server=HEMA\\SQLEXPRESS;Integrated Security=SSPI;database=demo");
This works for me
I would like to add one more thing.
I could connect to the remote server but not my server which was installed on my pc.
But anyway the above code worked.

thanks again
Aug 1 '07 #3

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

Similar topics

5
by: Roy Gourgi | last post by:
Hi, I just installed VS 2005 Express with SQL Server and when I try to run the code that was working with VS 2003 is no longer working. Is it not backward compatible. What has changed. Below is...
3
by: Ann Marinas | last post by:
Hi there, I am currently developing an ASP.NET program that connects to a SQL Server 2000 database. I also have SQL Server 2005 Express installed on the same local machine. Prior to...
2
by: hfk0 | last post by:
Hello, I'm a newbie here and was wondering anyone could help me with this. I have a simple ASP.NET 2 web application running perfectly fine with IIS and SQLServerExpress installed locally on...
3
by: dagato2 | last post by:
Hi all, I have installed SQL SERVER 2005 EXPRESS but i cant do a remote login with SQL Server Management Studio Express. I have deactivated Windows XP firewall in the SQL SERVER side and I have...
0
by: Jonathan Wood | last post by:
I seem to be having errors creating and accessing an SQL database. Unfortunatley, I am brand new to SQL setup and administration issues so this really is not my area of expertise. I know I had...
2
by: Patrick F | last post by:
Hi, i have SQL Server 2005 and a database set that is called, myCompany the problem is that i cant connect from my page to it, here is from the web.config: ( i have got this connectionstring from...
2
by: samadams_2006 | last post by:
Hello, I have a problem that I'm hoping someone will be able to help me resolve. 1) I have a C# Web Site in which I connect to the database: "Install Microsoft SQL Server 2005 Express...
3
by: Me LK | last post by:
I did a search but could not find an aswer that worked so here it goes. I just did an upgrade from 2003 to vs 2005 express. I am using a remote sql server 2000. I specifically upgrade to make...
0
by: aboutjav.com | last post by:
Hi, I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property ...
0
by: mina | last post by:
My application which is written in vb.net 2005 uses sql server 2005 express as a database, this application is multi-user. So i am used 3 xp machine to install my application i can say...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.