Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact
A1VBCode Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      

Home » Visual Basic (VB 4/5/6) » Database Programming » Database login failed


Database login failedExpand / Collapse
Author
Message
Posted 8/6/2008 9:56:11 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/11/2008 10:04:55 PM
Posts: 3, Visits: 3
 I try to access a same database using two different system,

a) a window based system and
b) a web based system.

Both are using VB.NET.  But it seem like the there is either one of them can access the database at a time. When one of them running, the other system unable to access. The error is

"Cannot open user default database. Login failed. Login failed for user 'PY1234\Jen'."

PY1234/Jen is a window authoization.
I was using  MS SQL Sever Express 2005 and the connection string are 

  <connectionStrings>
    <add name="WhyWhy.My.MySettings.BookShopConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\bin\Debug\BookShop.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>

As a conclusion i need the database to be  connected by multiuser at the same time
Any help is appreciated.
Post #25530
Posted 8/26/2008 2:15:47 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 10/10/2008 5:47:58 AM
Posts: 27, Visits: 206
try this

but dont attach the database in your in your application. let it reside in the db sarver derectory.

configure the msslq server to sql serve authentication mode.

at you application config...

<connectionStrings>
  <add name="sampleConnectionString" connectionString="Data Source=ServerName or IP Address\SQLEXPRESS;Initial Catalog=dbname;User ID="your user ID";Password="your password">
 </connectionStrings>

Post #25617
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Brian, Peter

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 3:16am