Search Results

Search found 12 results on 1 pages for 'cl4ncy'.

Page 1/1 | 1 

  • SQL Server 2008 Restore hangs on 100%

    - by CL4NCY
    Hi, I have backed up a large database from SQL 2005 and am trying to restore it to a SQL 2008 database. It seems to work ok until it gets to 100% when it hangs indefinitely. I've managed to restore smaller databases to this server ok. Any ideas?

    Read the article

  • SQL Joins on varchar fields timing out

    - by CL4NCY
    Hi, I have a join which deletes rows that match another table but the joining fields have to be a large varchar (250 chars). I know this isn't ideal but I can't think of a better way. Here's my query: DELETE P FROM dbo.FeedPhotos AS P INNER JOIN dbo.ListingPhotos AS P1 ON P.photo = P1.feedImage INNER JOIN dbo.Listings AS L ON P.accountID = L.accountID WHERE P.feedID = @feedID This query is constantly timing out even though there are less than 1000 rows in the ListingPhotos table. Any help would be appreciated.

    Read the article

  • SQL Query to check ALL days exist between a date range

    - by CL4NCY
    Hi, I have a table of Prices with a start date, end date and price. I want a search to pass in a date range and return whether a price exists for all days in that range. The date range can span multiple prices, just not have any gaps in between. Is this possible? Prices startDate datetime endDate datetime price DECLARE @startDate datetime = '2010-04-01', @endDate datetime = '2010-04-30' SELECT * FROM Prices WHERE @startDate BETWEEN startDate AND endDate...

    Read the article

  • Missing backslashes in filename using C#

    - by CL4NCY
    Hi, I have a string literal as follows: string filename = @"C:\myfolder\myfile.jpg"; When I use File.Exists(filename) it works most of the time but sometimes I get an error saying the following file doesn't exist: C:myfoldermyfile.jpg Something seems to strip the backslashes out of the filename. This code is sometimes accessed via an ajax request. Does anyone know why/how this could be happening? Edit: Here is a more detailed version of the code. public class Feeds { public static string ftpDir = @"C:\website\Feeds\"; } public class Feed { public static void run(string name) { if (!Directory.Exists(Feeds.ftpDir + name)){ Response.Write("Feed doesn't exist '" + Feeds.ftpDir + name + "'"); return; } //run feed... } }

    Read the article

  • Missing backslahes in filename using C#

    - by CL4NCY
    Hi, I have a string literal as follows: string filename = @"C:\myfolder\myfile.jpg"; When I use File.Exists(filename) it works most of the time but sometimes I get an error saying the following file doesn't exist: C:myfoldermyfile.jpg Something seems to strip the backslashes out of the filename. This code is sometimes accessed via an ajax request. Does anyone know why/how this could be happening?

    Read the article

  • ASP.NET WebMethod Returns JSON wrapped in quotes

    - by CL4NCY
    Hi, I have an asp.net page with a WebMethod on it to pass JSON back to my javascript. Bellow is the web method: [WebMethod] public static string getData(Dictionary<string, string> d) { string response = "{ \"firstname\": \"John\", \"lastname\": \"Smith\" }"; return response; } When this is returned to the client it is formatted as follows: { \"d\": \"{ \"firstname\": \"John\", \"lastname\": \"Smith\" }\" } The problem is the double quotes wrapping everything under 'd'. Is there something I've missed in the web method or some other means of returning the data without the quotes? I don't really want to be stripping it out on the client everytime. Also I've seen other articles where this doesn't happen. Any help would be appreciated thanks.

    Read the article

  • SQL Update to the SUM if it's joined values

    - by CL4NCY
    Hi, I'm trying to update a field in the database to the sum of it's joined values: UPDATE P SET extrasPrice = SUM(E.price) FROM dbo.BookingPitchExtras AS E INNER JOIN dbo.BookingPitches AS P ON E.pitchID = P.ID AND P.bookingID = 1 WHERE E.[required] = 1 When I run this I get the following error: "An aggregate may not appear in the set list of an UPDATE statement." Any ideas?

    Read the article

  • SQL Update to the SUM of its joined values

    - by CL4NCY
    Hi, I'm trying to update a field in the database to the sum of its joined values: UPDATE P SET extrasPrice = SUM(E.price) FROM dbo.BookingPitchExtras AS E INNER JOIN dbo.BookingPitches AS P ON E.pitchID = P.ID AND P.bookingID = 1 WHERE E.[required] = 1 When I run this I get the following error: "An aggregate may not appear in the set list of an UPDATE statement." Any ideas?

    Read the article

  • Accessing global variables of custom controls in ASP.NET

    - by CL4NCY
    Hi, I have built lots of custom asp.net controls which work really well separately but I want to somehow allow global access to all their variables from anywhere on the page. I have a central control called the ContentManager which I can use to store these variables. The problem I have is that all the controls are bound at different times so I only want the variables available after they're bound. For example I have many custom repeaters on the page which when bound I want to add a reference in the content manager so all their variables are then available to use. <Custom:ContentManager ID="cm" runat="server"/> <Custom:Repeater ID="r1" runat="server"/> <Custom:Repeater ID="r2" runat="server"/> <Custom:Repeater ID="r3" runat="server"/> Then I want a tag which can access all variables from any of these controls. <%= cm.controls["r1"].Items[0]["name"] %> The problem with this is that the variable isn't available until the repeater is bound so I might need to use events to push out the value to tags on the page like so: <Custom:Var ID="v1" control="r1" value="Items[0]["name"]" runat="server"/> Is this possible or can you recommend a better approach?

    Read the article

  • Multiple System.Web.Extensions assembly in same project?

    - by CL4NCY
    Hi, I'm having trouble moving a website from one server to another. It seems to be a problem loading multiple versions of System.Web.Extensions. The code uses version 3.5 in most places but a third party control appears to be needing version 1.0.6. I didn't think this was possible but it appears to be working in it's current situation. Is there a way I can use the GAC version of System.Web.Extensions for the site but import a dll of version 1.0.6 just for these controls?

    Read the article

  • SQL OUTER JOIN with NEWID to generate random data for each row

    - by CL4NCY
    Hi, I want to generate some test data so for each row in a table I want to insert 10 random rows in another, see below: INSERT INTO CarFeatures (carID, featureID) SELECT C.ID, F.ID FROM dbo.Cars AS C OUTER APPLY ( SELECT TOP 10 ID FROM dbo.Features ORDER BY NEWID() ) AS F Only trouble is this returns the same values for each row. How do I order them randomly?

    Read the article

1