Monday, March 19, 2012
Login failed
I have this error:
28000[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed
How do I fix that?
I need some help about.
Regards,Is the error for the log reader, the distribution agent, or both?
-PatP|||Hi,
The log reader is working properly. The error is from distribution task
ie SERVER1..BD1 -- Replication --> SERVER2..BD2
taskname: SERVER1_BD1_SERVER2_BD2|||See sp_changesubscriber (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_repl_4kaa.asp) for details.
-PatP|||See this KBA http://support.microsoft.com/default.aspx?scid=kb;EN-US;216848 is any help.
Monday, March 12, 2012
Login box when starting Report Builder
I'm new in SSRS so hopefully this will be an easy question.
I want to create a report model based on a cube. I have created a data source for the cube. Now when I click on Report Builder I get a login box titled "Microsoft Report Server Login".
When I enter the local admin account and password I get:
No report server was found at http://crossdatabase/ReportServer
When I enter that URL in IE I get:
crossdatabase/ReportServer - /
zondag 16 september 2007 23:24 <ds> Crossdatabase
Microsoft SQL Server Reporting Services Version 9.00.1399.00 What am I doing wrong? I already found some explanation about adding the Report Builder role so in home I now have:
Thanks,Stijn Verrept.
Please review the link below and let us know if this fixes your issue.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1697246&SiteID=1
|||I won't have access to the machine till later on, but this post is about users not seeing the Report Builder button. I'm admin, I see the button but when I click it I get the login box.|||
I tried but still get the same login box after clicking on the Report Builder button.
This is the login box that I get:
http://www.caresolutions.be/login.jpg
|||According to your log above, you are running SQL Server 2005 RTM (Version 9.00.1399.00 ). You need to apply Service Pack 2 which should get you to Version 9.00.3042.00 and may fix your problem.
|||This indeed fixed my problem, I now have another one however, but I'll post this in a new thread. Thanks.
Wednesday, March 7, 2012
Logical Operators in SQL statement
newLoanSQL = "SELECT LOAN_ID, DEPENDANT_CHILDREN, RESIDENTIAL_STATUS, LOAN_AMOUNT, INTEREST_RATE, DURATION, REPAYMENTS, REPAYMENT_AMOUNT, PURPOSE, OCCUPATION, EMPLOYMENT_STATUS, EMPLOYERS_NAME, ANNUAL_INCOME, SPOUSE_NAME, GUARANTOR, SECURITY, APPROVAL_ONE, APPROVAL_TWO, APPROVAL_THREE FROM LOAN_DETAILS Where NEW_APPLICATION = '" & searchString & "' AND APPROVER1_ID <> '" & id & "' OR APPROVER2_ID <> '" & id & "' OR APPROVER3_ID <> '" & id & "'"
The SQL statement was working fine until I added the following:
AND APPROVER1_ID <> '" & id & "' OR APPROVER2_ID <> '" & id & "' OR APPROVER3_ID <> '" & id & "'
Can anyone help me please?If you mix ANDs and ORs like that you are likely to get the wrong result due to the order in which they get processed. Bracket the ORs together like this:
Where NEW_APPLICATION = ? AND (APPROVER1_ID <> ? OR APPROVER2_ID <> ? OR APPROVER3_ID <> ?)
But is that really what you want? I imagine what you meant was really:
Where NEW_APPLICATION = ? AND (APPROVER1_ID <> ? AND APPROVER2_ID <> ? AND APPROVER3_ID <> ?)
i.e. "the given ID must not appear in ANY of the 3 approver_id columns", rather than "the given ID must not appear in ALL 3 of the approver_id columns (but can appear in 1 or 2 of them)"
Note: I am encouraging you to change to bind variables at the same time. Not only do they make the code more readable and reduce typing errors, they also improve the performance and security of your application.|||I did as suggested by Tony Andrews. However, the SQL statement still is not working.
newLoanSQL = "SELECT LOAN_DETAILS.LOAN_ID, LOAN_DETAILS.DEPENDANT_CHILDREN, LOAN_DETAILS.RESIDENTIAL_STATUS, LOAN_DETAILS.LOAN_AMOUNT, LOAN_DETAILS.INTEREST_RATE, LOAN_DETAILS.DURATION, LOAN_DETAILS.REPAYMENTS, LOAN_DETAILS.REPAYMENT_AMOUNT, LOAN_DETAILS.PURPOSE, LOAN_DETAILS.OCCUPATION, LOAN_DETAILS.EMPLOYMENT_STATUS, LOAN_DETAILS.EMPLOYERS_NAME, LOAN_DETAILS.ANNUAL_INCOME, LOAN_DETAILS.SPOUSE_NAME, LOAN_DETAILS.GUARANTOR, LOAN_DETAILS.SECURITY, LOAN_DETAILS.APPROVAL_ONE, LOAN_DETAILS.APPROVAL_TWO, LOAN_DETAILS.APPROVAL_THREE, LOAN_DETAILS.NEW_APPLICATION, LOAN_DETAILS.APPROVER1_ID, LOAN_DETAILS.APPROVER2_ID, LOAN_DETAILS.APPROVER3_ID FROM LOAN_DETAILS WHERE LOAN_DETAILS.NEW_APPLICATION='Yes' AND (APPROVER1_ID <> '" & sID & "' AND APPROVER2_ID <> '" & sID & "' AND APPROVER3_ID <> '" & sID & "') OR (LOAN_DETAILS.APPROVER1_ID Is Null AND LOAN_DETAILS.APPROVER2_ID Is Null AND LOAN_DETAILS.APPROVER3_ID Is Null)"
Please, can someone help me with this as I am working to a deadline.
Thanks in advance|||NULLs are a problem in SQL too, since they are neither equal to, nor not equal to, anything - including NULL! So perhaps what you need is:
((APPROVER1_ID <> ? OR APPROVER1_ID IS NULL)
AND (APPROVER2_ID <> ? OR APPROVER2_ID IS NULL)
AND (APPROVER3_ID <> ? OR APPROVER3_ID IS NULL))|||All working now! Thanks a million, I really appreciate your help.
Cheers