3 Replies - 1732 Views - Last Post: 04 May 2011 - 02:05 PM Rate Topic: -----

#1 Hussein39  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 04-May 11

Connect to sqlexpress

Posted 04 May 2011 - 03:52 AM

Hi there
i use Vitual stadio 2008 and i made a database using add items and then i selected Service based database that its extension is .mdf . my database name is db.mdf. so now i want to make a report using Crystal report. i selected crystal report from add items then i choose the using the report wizard and then standard and click ok. and in standard report creation wizard i was expanding OLE DB (ADO)and in OLE DB (ADO) Box i choose Microsoft OLE DB Provider for sql server not in connection information box. i wrote .\sqlexpress and chose integrated security and in front of Database i wrote DB.mdf and when i click finish its message that
Logon Failed.
Details: Ado error code: 0x
source: Microsoft OLE DB Provider for sql server
Description: Can not open database "DB.mdf" requested by the login. The login failed.
sql state: 42000
Native error.
thank you

Is This A Good Question/Topic? 0
  • +

Replies To: Connect to sqlexpress

#2 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1252
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: Connect to sqlexpress

Posted 04 May 2011 - 04:05 AM

I'm not familiar with Crystal Reports, I've never used it for more than a little test.

Please post a screenshot of where you're choosing your credentials and setting the SQL Instance name. (Where you type in .\SQLEXPRESS)

You can also try typing in .\SQLEXPRESS instead of .\sqlexpress - I'm not sure if it's case sensitive.

Then there's something else you can do.

Go to the services window, and check what name your SQL server instance has. Maybe you put something else during installation and it's not the default SQLEXPRESS.

How to find your instance name?
Was This Post Helpful? 0
  • +
  • -

#3 Hussein39  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 04-May 11

Re: Connect to sqlexpress

Posted 04 May 2011 - 02:04 PM

Thank you my friend i could find the problem. i should have to attach my database but i didn't.
Was This Post Helpful? 0
  • +
  • -

#4 Ionut  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 385
  • View blog
  • Posts: 1,057
  • Joined: 17-July 10

Re: Connect to sqlexpress

Posted 04 May 2011 - 02:05 PM

If you connect to SQL Server with SqlServerManagementStudio using Windows Authentification, do you have access to your database(if it is attached)?

EDIT: ah..doesn't matter. Glad you figured it out

This post has been edited by Ionut: 04 May 2011 - 02:08 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1