Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 13th, 2007, 02:03 PM
Registered User
 
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default connecting to a sql 2005 express database

Hi

Am new to vb.net 2005 and of late i have been trying to connect to sql server 2005 express edition. I have been getting the following error and I have tried changing my connection string, but this has been to no avail. I am receiving this error.

I have also tried connecting to a sql 2000 database and I am still getting the same problem. How can I fix this. I have also included my connections string below, maybe there is something wrong with it.

I hope u will be able to help me.

twsted F8



Cannot open database "C:\Documents and Settings\chiko-shumba\My Documents\Visual Studio 2005\Projects\YMCA\YMCA" requested by the login. The login failed.
Login failed for user 'CHIKO\chiko-shumba'.

Data Source= .\SQLEXPRESS;Initial Catalog = C:\Documents and Settings\chiko-shumba\My Documents\Visual Studio 2005\Projects\YMCA\YMCA;Integrated Security=True;User Instance=True;"


 
Old September 13th, 2007, 09:49 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

It would appear to be something regarding security. As the error indicates the user you are running the program under doesn't have access to the database file. I haven't worked with Express much, but I think the problem is related to file access rights for the db file.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to SQL Server 2005 Express Locally GM_Access BOOK: Beginning Access 2003 VBA 1 August 7th, 2007 06:34 PM
Connecting to SQL server 2000 with VB 2005 Express ericgelders Visual Basic 2005 Basics 0 February 20th, 2007 06:15 PM
SQL 2005 Express database mark as 'SUSPECT' dex_bg SQL Server 2005 4 September 19th, 2006 04:07 AM
connecting to SQL express cherry C# 2005 2 September 2nd, 2006 12:34 PM
C# connecting to SQL Express supertorro C# 0 July 10th, 2006 07:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.