|
I don't use EF; I've no idea what it epects beyond a normal SQL-server connection string. According to MSDN[^] your string looks correct.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
lholdorf wrote: Check the inner exceptions for details and ensure that the connection string is correct.
This is a good time to post the inner exceptions.
|
|
|
|
|
Where does your asp.net application run - on the same machine? If not, configure the SQL Server to accept connections from other machines.
And what about the account the IIS is running with? Does that account have sufficient access rights to the database? I suggest SQL Server authentication instead of WIndows authentication - do not forget to configure your SQL Server to allow that.
|
|
|
|
|
lholdorf wrote: HOLDORF-PC\\SQL_2008_R2
Is the double back-slash between the machine name and the instance name a typo in your question, or a mistake in copying the connection string from a C# source file to the web.config file?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Hello- can you give me any example scenarios/questions for writing a complex SELECT statements? My intention is to improve my SQL skills.
|
|
|
|
|
|
|
Sure, try implementing a Turing Machine in SQL.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
|
data modeling guy wrote:
Hello- can you give me any example
scenarios/questions for writing a complex SELECT statements? My intention is to
improve my SQL skills.
- Calculate reputation points of a user.
- Fetch the contibutions-section for a user (see the section on your user-page; it contains some statistics)
- Fetch the ten members from the database that answered most questions last month.
- Fetch the voting-percentages for the straw-poll result for all possible answers.
- Fetch any low-repuation member that posts the same message in multiple places, ordered by the amount of similar messages.
- Fetch the data to show the forum-content for page 3 of this forum, in threaded view, with 50 posts per page.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
No no no these suggestions expect him to do the work and write the queries, it sounds like he wants YOU to write the queries and he will study them.
Good luck getting CM to lend out the database and schema
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks Eddy. I Did some more google search and found some more. Cheers!
|
|
|
|
|
|
I tried this
select convert(datetime, 41818) as mydate
result
2014-06-30 00:00:00.000
In Excel, it should be
6/28/2014
It's always 2 days in advance
Please help!
Thanks a lot
|
|
|
|
|
Why do you think it's wrong?
SELECT DATEDIFF ( dd , '1900-01-01' , '2014-06-30' )
SELECT DATEADD ( dd, 41818 , '1900-01-01' )
Miller Nguyen wrote: In Excel, it should be
What do you mean "it should be" ?
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
I don't say it's wrong, that's why I put the QUESTION MARK in the topic.
I just wonder why Excel and SQL are giving different result
|
|
|
|
|
What the f...? You are right, I tested it.
Look at day number 0: with SQL Server, it is Jan 1, 1900; with Excel: Jan 0 , 1900.
The next bug is the leap year: Excel treats 1900 as a leap year (that's wrong!), while SQL Server correctly knows that 1900 is not a leap year.
In sum, those differences account for the 2 days difference in current dates.
|
|
|
|
|
|
Yeah, as I drifted off to sleep last night I recalled that Joel had written about Excel having to support a Lotus 123 issue.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
I love that story.
They brought a f*** counter to all meetings with BillG.
|
|
|
|
|
See my answer to Bernhard
|
|
|
|
|
|
Oh, btw, have a look if this[^] and this[^] would be of any use for you.
|
|
|
|
|
For example, -0.5 and 0.5 both mean noon on 30 December 1899 No, no, no! I do not want to use that function!
|
|
|
|