|
-
Mar 8th, 2007, 11:22 AM
#1
Thread Starter
Hyperactive Member
[2005] Login failed to database error
Last edited by super_nOOb; Mar 8th, 2007 at 11:31 AM.
-
Mar 8th, 2007, 04:03 PM
#2
Re: [2005] Login failed to database error
If you use the wizard to add a datasource then it will add your datasource to the "Data Sources" window in VS. Select the database in the "Data Sources" window and then select "Do not copy to output folder" from the properties window. That should clear everything up.
-
Mar 8th, 2007, 04:19 PM
#3
Thread Starter
Hyperactive Member
Re: [2005] Login failed to database error
Actually i will tell you the whole story. I was using the wizard (add new data source - then select the path) and then when i was testing the connection i was getting an error msg
Code:
Generating user instances in SQL Server is disabled. Use sp_configure
'user instances enabled' to generate user instances
Then after that i had to reconfigure the SQL Express to user instances enabled with this command
Code:
SP_CONFIGURE ['user instances enabled'], 1
GO
RECONFIGURE
GO
And then i was able to add the database in the datasource.
Then i binded my report to the datasource. And when i debugged the form (report) the report could not be generated.
After that i tried to dubug my application and i was getting and error in the connection (which is using windows authentication). THe error message was saying that my user name (the name of the user in my machine) could not connect to the database
So what i did was to uninstall the SQL server and install it back again, cuz i thought i had screwd it up. This took me nearly 3 hrs to get it all back on track.
Then i did the whole thing again and got the same error and problem. So i found out that my user was creating an isntance inside od the dabase and "changing" the connection.
So i deleted the database from the SQL server and added it again.
Now im back where i was, i can debug my application correctly but whenever i add the datasource i get this problem
-
Mar 8th, 2007, 04:22 PM
#4
Re: [2005] Login failed to database error
Have you tried binding through code instead of at design time?
-
Mar 8th, 2007, 05:00 PM
#5
Thread Starter
Hyperactive Member
Re: [2005] Login failed to database error
I still didnt. Do you have any sample codes that i can try to use?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|