Home All Groups Group Topic Archive Search About

SQL Server Authentication issues!

Author
15 Dec 2006 8:47 PM
Tony
Hi all!

I am having a rather odd issue with VB.Net (Visual Studio 2005) and SQL
Server 2005. I developed a little app for our team but then decided to
make it available for others. Since out team was given admin rights to
our database, I used integrated security for the first version of the
app. When I opened it up to other groups, I changed to SQL
authentication.

The problem is that no one outside our group has been able to use the
app because of DB connection issues. It always works from my machine,
so I checked the activity monitor on the server. Sure enough, I am
logged in as myself instead of the user I set up for the application.

Here is the connection string:

Private m_SQLConStr As String = "Data Source=MYDB;Initial
Catalog=MYDATA;Integrated Security=False;Persist Security
Info=False;User ID=MYUSER;Password=MYPASSWORD"

Does anyone have any insight into this problem?

Thanks!

Author
16 Dec 2006 6:10 AM
Plamen Ratchev
Hi,

Can you modify your connection string to look like this and see if it works:

Private m_SQLConStr As String = "Data Source=MYDB;Initial
Catalog=MYDATA;User Id=MYUSER;Password=MYPASSWORD;"

You can also try:

Private m_SQLConStr As String = "Server=MYDB;Database=MYDATA;User
ID=MYUSER;Password=MYPASSWORD;Trusted_Connection=False;"

Regards,

Plamen Ratchev
http://www.SQLStudio.com

Show quoteHide quote
"Tony" <schie***@computer.org> wrote in message
news:1166215634.428796.93090@80g2000cwy.googlegroups.com...
> Hi all!
>
> I am having a rather odd issue with VB.Net (Visual Studio 2005) and SQL
> Server 2005. I developed a little app for our team but then decided to
> make it available for others. Since out team was given admin rights to
> our database, I used integrated security for the first version of the
> app. When I opened it up to other groups, I changed to SQL
> authentication.
>
> The problem is that no one outside our group has been able to use the
> app because of DB connection issues. It always works from my machine,
> so I checked the activity monitor on the server. Sure enough, I am
> logged in as myself instead of the user I set up for the application.
>
> Here is the connection string:
>
> Private m_SQLConStr As String = "Data Source=MYDB;Initial
> Catalog=MYDATA;Integrated Security=False;Persist Security
> Info=False;User ID=MYUSER;Password=MYPASSWORD"
>
> Does anyone have any insight into this problem?
>
> Thanks!
>
Author
18 Dec 2006 9:54 PM
Tony
Hi!

I have added the trusted source section to the string so it looks like
the following:

"Data Source=MYDB;Initial Catalog=MYDATA;Integrated
Security=False;Persist Security Info=False;User
ID=MYUSER;Password=MYPASSWORD;Trusted_Connection=False;"

It is STILL connecting as my login. This is very irritating. Does
anyone have any more suggestions?


Plamen Ratchev wrote:
Show quoteHide quote
> Hi,
>
> Can you modify your connection string to look like this and see if it works:
>
> Private m_SQLConStr As String = "Data Source=MYDB;Initial
> Catalog=MYDATA;User Id=MYUSER;Password=MYPASSWORD;"
>
> You can also try:
>
> Private m_SQLConStr As String = "Server=MYDB;Database=MYDATA;User
> ID=MYUSER;Password=MYPASSWORD;Trusted_Connection=False;"
>
> Regards,
>
> Plamen Ratchev
> http://www.SQLStudio.com
>

Thanks,
Tony
Author
21 Dec 2006 2:33 PM
Plamen Ratchev
Is it possible that you have defined connection strings on two locations in
your code and not using the correct one?

Regards,

Plamen Ratchev
http://www.SQLStudio.com


Show quoteHide quote
"Tony" <schie***@computer.org> wrote in message
news:1166478851.754914.88070@80g2000cwy.googlegroups.com...
> Hi!
>
> I have added the trusted source section to the string so it looks like
> the following:
>
> "Data Source=MYDB;Initial Catalog=MYDATA;Integrated
> Security=False;Persist Security Info=False;User
> ID=MYUSER;Password=MYPASSWORD;Trusted_Connection=False;"
>
> It is STILL connecting as my login. This is very irritating. Does
> anyone have any more suggestions?
>
>
> Plamen Ratchev wrote:
>> Hi,
>>
>> Can you modify your connection string to look like this and see if it
>> works:
>>
>> Private m_SQLConStr As String = "Data Source=MYDB;Initial
>> Catalog=MYDATA;User Id=MYUSER;Password=MYPASSWORD;"
>>
>> You can also try:
>>
>> Private m_SQLConStr As String = "Server=MYDB;Database=MYDATA;User
>> ID=MYUSER;Password=MYPASSWORD;Trusted_Connection=False;"
>>
>> Regards,
>>
>> Plamen Ratchev
>> http://www.SQLStudio.com
>>
>
> Thanks,
> Tony
>