User Profile

Collapse

Profile Sidebar

Collapse
sjohnson1984
sjohnson1984
Last Activity: Jun 18 '09, 03:50 PM
Joined: Oct 5 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

    Hello,

    I am trying to gain data from a linked server using:

    Code:
    select * from [LINKEDSERVER].[DBNAME].dbo.CampaignFAct
    However, receive back the error in the title of this post:

    Msg 18456, Level 14, State 1, Line 1
    Login failed for user 'NT AUTHORITY\ANONY MOUS LOGON'.

    Does this immediately make apparent what the problem is? No problems to provide more info......
    See more | Go to post

  • ...just cleaning up.

    The SP is:

    Code:
    CREATE PROCEDURE [dbo].[ReturnCustDetailsFromTelNumber]
    	@DatabaseName varchar(200),
    	@Telephone varchar(20)
    AS
    	BEGIN
    
    	DECLARE @UseStatement varchar(2000)	
    	
    	SET @UseStatement = ('USE [' + @DatabaseName + ']')
    
    	SET NOCOUNT OFF
    
    	EXEC (@UseStatement + ' SELECT * from CustomerData where Telephone
    ...
    See more | Go to post

    Leave a comment:


  • sjohnson1984
    started a topic SQL Addition Problem

    SQL Addition Problem

    I have the following within a SELECT statement:

    Code:
    :
    
    
    AnnualRP = sum(CASE WHEN Original.CampCode like '%u%' 
    AND(Original.CompletedCode = 24 OR Original.CompletedCode = 25) 
    THEN cast((adprem)*12 as money)
    WHEN Original.CampCode like '%u%' 
    AND(Original.CompletedCode <> 25 AND Original.CompletedCode <> 24) THEN 0 
    ELSE cast((Price)*12 as money) END) 
    + (Select
    ...
    See more | Go to post

  • sjohnson1984
    replied to ASP Page Not Recognising Dataset
    Code:
    CREATE PROCEDURE [dbo].[ReturnCustDetailsFromTelNumber]
    	-- Add the parameters for the stored procedure here
    	@DatabaseName varchar(200),
    	@Telephone varchar(20)
    AS
    	BEGIN
    
    	SET NOCOUNT ON --!
    
    	DECLARE @UseStatement varchar(2000)	
    	
    	SET @UseStatement = ('USE [' + @DatabaseName + ']')
    
    	SET NOCOUNT OFF --!
    
    	EXEC (@UseStatement + ' SELECT
    ...
    See more | Go to post

    Leave a comment:


  • sjohnson1984
    started a topic ASP Page Not Recognising Dataset

    ASP Page Not Recognising Dataset

    Hello,

    I have a stored procedure (SQL Server 2005) which is the following:

    Code:
    CREATE PROCEDURE [dbo].[ReturnCustDetailsFromTelNumber]
    	@DatabaseName varchar(200),
    	@Telephone varchar(20)
    AS
    	BEGIN
    	DECLARE @UseStatement varchar(2000)
    	SET @UseStatement = ('USE [' + @DatabaseName + ']')
    	EXEC (@UseStatement + ' SELECT * from CustomerData where Telephone = ''' + @Telephone
    ...
    See more | Go to post

  • sjohnson1984
    started a topic Running MS Access queries from SQL Agent

    Running MS Access queries from SQL Agent

    Hello,

    My question is pretty much summed up in the title of this: How do we run queries using SQL Server Agent.

    Part of my company uses an Access dB, in this Access dB I have an append query that appends data to a SQL Server table: we want to have this query run overnight rather than, a prevelant case seemingly, having to have someone "push the button" every day. Obviously the append query is set to NoCount....
    See more | Go to post

  • sjohnson1984
    replied to Function: Time Format
    in .NET
    I am suprised no-one shouted at this one, however the function did not work correctly as TimeSpan moves any hours over 24 into the Day property!

    The correct function is:

    Code:
    Public Shared Function timeFormat(Seconds As Double) as String
       Dim t as TimeSpan
       t = TimeSpan.FromSeconds(Seconds)
       timeformat = CStr((t.Days*24) + t.Hours) & ":" & t.Minutes & ":"
    ...
    See more | Go to post

    Leave a comment:


  • sjohnson1984
    replied to Function: Time Format
    in .NET
    Thanks for your reply!

    The bottom function works for single cells, however when summing, it does not display correctly. In the detail row I have:

    Code:
    =Fields!TotalDailySeconds.value
    ...in a hidden row I have
    Code:
     =sum(Fields!TotalDailySeconds.value)
    , a textbox which I have called ctlTotalTime.

    Then in the row which is visible I have
    Code:
    =code.timeFormat(ReportItems!ctlTotalTime)
    ...
    See more | Go to post

    Leave a comment:


  • sjohnson1984
    replied to Function: Time Format
    in .NET
    OK I do know that I had two variables named "seconds", though I still cannot get this to work:

    Code:
    Public Shared Function timeFormat(Seconds As Double) as String
    
    Dim outHours, outSeconds, outMinutes as Double
    
    if (Seconds = nothing) or (Seconds = 0)
         timeFormat = 0
    
    else
        outHours = Seconds / 3600
        outMinutes = (Seconds % 3600) / 60
        outSeconds
    ...
    See more | Go to post

    Leave a comment:


  • sjohnson1984
    started a topic Function: Time Format
    in .NET

    Function: Time Format

    Hello all,

    Thanks for reading firstly.

    I am looking to format seconds into a format similar to that of an Excel "custom" format [h]:mm:ss

    I have crafted the following however I am getting an error:

    Code:
    Public Shared Function timeFormat(Seconds As Double) as String
    
    if (Seconds = nothing) or (Seconds = 0)
         timeFormat = 0
    
     else
    ...
    See more | Go to post

  • ONE more thing that will help learners like myself and could have saved me a lot of time here:

    Javascript document.getEle mentById, uses, obviously, a tags ID, whereas, and this for me was crucial, Request.Form goes on the name of the tags. Therefore, in my Javascript function to switch rows on and off I could write:

    [CODE=javascript]

    function activate_row(pa rameter){
    var dbWriteFlag = document.getEle mentById('dbWri te_'...
    See more | Go to post

    Leave a comment:


  • Hello,

    The above explanation is pretty much what I picked up in the reply interval - fortunately I have now got the concept of 'for' loops down - I hope!

    In the interests of others that are searching around for a solution to a similar problem here is how I solved this:

    [CODE=ASP]

    Set db03 = Server.CreateOb ject( "ADODB.Connecti on" )
    OdbcConStr = Session("Advanc eConnection")...
    See more | Go to post

    Leave a comment:


  • Multiple form values dimensioned by userID, passed to an array then writing to dB

    Hello all,

    I have a form which is generated using a database query - the recordset is filled with agent details, login time and the like, and there are as many rows in the table as records in the set (plus table header).

    My problem is that I do not know how to pass the details of each record to an array session variable, once the form is submitted, and subsequently write all of this info to a dB.

    I have...
    See more | Go to post

  • sjohnson1984
    started a topic Rounding down in hundreds

    Rounding down in hundreds

    Hi all, here's a quick for which I haven't been able to track down a quick solution on Google. The 2 amounts delivered ('outgoings' and 'alreadyprotect ed' will always be between 0 and 9999.

    [CODE=JavaScript]

    function unprotectedcalc (){
    var outgoings = document.getEle mentById('EssOu tgoings');
    var alreadyprotecte d = document.getEle mentById('Prote ctedPayments');
    var result = document.getEle mentById('Unpro tectedResult');...
    See more | Go to post

  • sjohnson1984
    started a topic PDF popped with javascript but....

    PDF popped with javascript but....

    Hi all,

    If you read my previous and first post, my apologies for this one not being such an easy one (it would seem!).

    So the problem is: after a pdf is popped in a new window, the user can click on the advertisement button labelled, for example, "Create Documents Any One Can Use" or "Do More With Adobe PDF" (i.e. the advertisment in the top right of Adobe PDF Reader) and open a new window that, crucially...
    See more | Go to post

  • Many thanks for your keen eyes. JavaScript is case sensitive indeed; it would seem that I am not though! (Ignore the Q5valu/Q5val mismatch in the script, that was just an error in copying across).

    Many thanks for your reply, a mental note has been made: "Read more carefully".

    Thanks again for being able to use your eyes in a way more efficient manner than I use mine atm!

    Have a good day...
    See more | Go to post

    Leave a comment:


  • Javascript IF statement - condition / actions causing an error in IE 6

    Hello all, thanks for taking the time out to read this.

    I have a javascript function, the purpose of which is to compare 2 form values and redirect the user if two values are met - however, although it seems simplicity, IE throws up an error box reading "Error: Object does't support this property or method_ Code: 0".

    Slight background on the use of this: user talks to customer on the phone, asks questions and...
    See more | Go to post
    Last edited by pbmods; Oct 5 '07, 10:12 PM. Reason: Fixed CODE tags.
No activity results to display
Show More
Working...