Search Results

Search found 1882 results on 76 pages for 'tom kyte'.

Page 7/76 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • PHP: How to implement a __get-like method for local function variables

    - by Tom Frost
    I'm no stranger to __get(), and have used it to make some very convenient libraries in the past. However, I'm faced with a new challenge (PHP 5.3, abbreviated and simplified my code for this question): <?php namespace test; class View { function __construct($filename, $varArray) { $this->filename = $filename; $this->varArray = $varArray; } function display() { include($this->filename); } function __get($varName) { if (isset($this->varArray[$varName])) return $this->varArray[$varName]; return "?? $varname ??"; } } ?> Above is a very, very simplified system for loading a View. This code would call the view and display it: <?php require_once("View.php"); use test\View; $view = new View("views/myview.php", array("user" => "Tom")); $view->display(); ?> My goal for this code is to allow the view "myview.php" to contain code like this: <p> Hello <?php echo $user; ?>! Your E-mail is <?php echo $email; ?> </p> And, used with the above code, this would output "Hello Tom! Your E-mail is ?? email ??" However, this won't work. The view is being included within a class method, so when it refers to $user and $email, it's looking for local function variables -- not variables belonging to the View class. For this reason, __get never gets triggered. I could change all my view's variables to things like $this-user and $this-email, but that would be a messy and unintuitive solution. I'd love to find a way where I can reference variables directly WITHOUT having PHP throw an error when an undefined variable is used. Thoughts? Is there a clean way to do this, or am I forced to resort to hacky solutions?

    Read the article

  • ASP.NET 4.0 , SQL 2008 Web development and deployment Cloud or Shared Hosting?

    - by Tom
    Just to give you a fair idea, I am new to the web development / hosting world and planning to develop a Multilingual Social networking Web Applications in ASP.NET 4.0 , expected the content to deliver in many countries German, France, China, India and MiddleEast. My question is will Cloud Hosting provides a development environment? or should i buy software and develop in my system?. Which is the best hosting model for my scenario. I do know there will not be many users and expecting a steady growth. Tom

    Read the article

  • Facebook Graph API With iPhone SDK

    - by Tom G
    Hi, Has anyone been able to implement Facebooks Graph API in a native iPhone Application? The documentation is pretty sparse when it comes to iPhone integration, but the calls to get users information looks a lot more light weight than the previous method of using FBConnect. So i would like to use it. I have seen a few posts about but none explain you you would implement the login button as we did previously with FBConnect? If any one has achieved this or can offer me any pointers that would be brilliant Thanks Tom

    Read the article

  • jq div display script webkit issues

    - by Tom
    $(document).ready(function() { $('#chekboxes a').click(function(e) { $('.visible').removeClass('visible').addClass('invisible'); var thediv = $(this).attr('href'); $(thediv).removeClass('invisible').addClass('visible'); }) }); This simple bit of jq works in FF and not in Chrome and Safari. Despite googling widely, I cannot tell whether there's a way to make it work in Safari and Chrome or not. Does anyone know a fix or what is wrong ? Thanks, Tom

    Read the article

  • Java NIO (Netty): Exceptionhandling in Downstream Hanlders/Chain

    - by Tom
    Hello Experts, could someone please explain to me, how in netty "Downstream Exceptions" are handeled? According to the javadoc there are no Downstream exceptions: http://docs.jboss.org/netty/3.1/api/org/jboss/netty/channel/ExceptionEvent.html Given the case that in one of my downstream handlers an exception occures OR in the I/0 Thread itself, where can these errors be catched and handeled? thank you very much tom

    Read the article

  • Add 2 values to 1 key in a PHP array

    - by Mike Munroe
    I have a result set of data that I want to write to an array in php. Here is my sample data: **Name** **Abbrev** Mike M Tom T Jim J Using that data, I want to create an array in php that is of the following: 1|Mike|M 2|Tom|T 3|Jim|j I tried array_push($values, 'name', 'abbreviation') [pseudo code], which gave me the following: 1|Mike 2|M 3|Tom 4|T 5|Jim 6|J I need to do a look up against this array to get the same key value, if I look up "Mike" or "M". What is the best way to write my result set into an array as set above where name and abbreviation share the same key?

    Read the article

  • rpmbuild generates RPM in which subdirectory

    - by Adil
    rpmbuild generates RPM under which directory? I checked the RPMS directory:- [root@tom adil]# ls /usr/src/redhat/ BUILD RPMS SOURCES SPECS SRPMS [root@tom adil]# ls /usr/src/redhat/RPMS/ athlon i386 i486 i586 i686 noarch [root@tom adil]# How to decide rpmbuild outputs in which of the above sub-directories? Is it controlled by spec file? What is the default option? I thought uname -p but its not the case probable uname -i is used. Linked to my last question http://stackoverflow.com/questions/2565282/difference-between-machine-hardware-and-hardware-platform

    Read the article

  • LEFT OUTER JOIN SUM doubles problem

    - by Michael
    Hi I've got two tables: Table: Shopping shop_id shop_name shop_time 1 Brian 40 2 Brian 31 3 Tom 20 4 Brian 30 Table:bananas banana_id banana_amount banana_person 1 1 Brian 2 1 Brian I now want it to print: Name: Tom | Time: 20 | Bananas: 0 Name: Brian | Time: 101 | Bananas: 2 I used this code: $result = dbquery("SELECT tz.*, tt.*, SUM(shop_time) as shoptime, count(banana_amount) as bananas FROM shopping tt LEFT OUTER JOIN bananas tz ON tt.shop_name=tz.banana_person GROUP by banana_person LIMIT 40 "); while ($data5 = dbarray($result)) { echo 'Name: '.$data5["shop_name"].' | Time: '.$data5["shoptime"].' | Bananas: '.$data5["bananas"].'<br>'; } The problem is that I get this instead: Name: Tom | Time: 20 | Bananas: 0 Name: Brian | Time: 202 | Bananas: 6 I just don't know how to get around this.

    Read the article

  • HQL to get elements that possess all items in a set

    - by Tauren
    Currently, I have an HQL query that returns all Members who possess ANY Award from a set of specified Awards: from Member m left join m.awards as a where a.name in ("Trophy","Ribbon"); What I now need is HQL that will return all Members who possess ALL Awards specified in the set of Awards. So, assuming this data: Joe has Trophy, Medal Sue has Trophy, Ribbon Tom has Trophy, Ribbon, Medal The query above would return Joe, Sue, and Tom because all three possess at least one of Trophy or Ribbon. But I need to return only Sue and Tom, because they are the only ones who possess all of the specified awards (Trophy and Ribbon). Here's the class structure (simplified): class Member { private String name; private Set<Award> awards; } class Award { private String name; }

    Read the article

  • What is the best way to join/merge two tables by column cell matching in Excel?

    - by blunders
    I've found this excel add-in to buy that appears to do what I need, but I'd rather have code that's open to use as I wish. While a GUI is nice, it's not required. In an attempt to make the question more clear, I'm adding some two sample "input" tables in tab delimited form, and the resulting output table: SAMPLE_INPUT_TABLE_01 NAME<tab>Location John<tab>US Mike<tab>CN Tom<tab>CA Sue<tab>RU SAMPLE_INPUT_TABLE_02 NAME<tab>Age John<tab>18 Mike<tab>36 Tom<tab>54 Mary<tab>18 SAMPLE_OUTPUT_TABLE_02 NAME<tab>Age<Location> John<tab>18<tab>US Mike<tab>36<tab>CN Tom<tab>54<tab>CA Sue<tab>""<tab>RU Mary<tab>18<tab>"" If it matters, I'm using Office 2010 on Windows 7.

    Read the article

  • null-coalescing operator or conditional operator

    - by rkrauter
    Which coding style do you prefer: object o = new object(); //string s1 = o ?? "Tom"; // Cannot implicitly convert type 'object' to 'string' CS0266 string s3 = Convert.ToString(o ?? "Tom"); string s2 = (o != null) ? o.ToString() : "Tom"; s2 or s3? Is it possible to make it shorter? s1 does not obviously work.

    Read the article

  • Search and Replace within a Text file using mySQL queries

    - by user241000
    How can I create PHP to search the testing.txt file for each name in the database table and replace the name with the database table id? So that the text file looks like this: 3 | 1 | 4 | 5 2 | 3 | 6 4 | 5 | 2 and so forth an so on... I have a mysql table called "nameslist" that looks like this: --------------------- id | name --------------------- 1 | bob 2 | john 3 | tom and so forth an so on... I have a text file called "testing.txt" that looks like this: tom | bob | mary | paul john | tom | rachel mary | paul | john and so forth an so on...

    Read the article

  • PHP: form action on same page, still show same until refresh

    - by Karem
    Yes, Im having a little edit profile page, index.php?mode=profile. Lets take the username in the editprofile form as example. The username is already in the username-field. So i changed from "Peter" to "Tom" and press save. The action is ?mode=profile&edit=true. So now when i have pressed save it has updated the column in the db from Peter to Tom. But this field keeps having the value "Peter" until if i do press refresh (or f5), then "Tom" will appear. Like it hasnt updated in the database anything, although it did but it still shows Peter until next refresh.. like it caches, but it shouldnt cache nothing? Any help on this? Is it because its on the same "page" / file? what can i do

    Read the article

  • Returning several COUNT results from one ASP SQL statement

    - by user89691
    Say I have a table like this: Field1 Field2 Field3 Field4 fred tom fred harry tom tom dick harry harry and I want to determine what proportion of it has been completed for each field. I can execute: SELECT COUNT (Field1) WHERE (Field1 <> '') AS Field1Count SELECT COUNT (Field2) WHERE (Field2 <> '') AS Field2Count SELECT COUNT (Field3) WHERE (Field3 <> '') AS Field3Count SELECT COUNT (Field4) WHERE (Field4 <> '') AS Field4Count Is it possible to roll up these separate SQL statements into one that will return the 4 results in one hit? Is there any performance advantage to doing so (given that the number of columns and rows may be quite large in practice)?

    Read the article

  • Retrieve names by ratio of their occurance

    - by jjiffer
    Hello, I'm somewhat new to SQL queries, and I'm struggling with this particular problem. Let's say I have query that returns the following 3 records (kept to one column for simplicity): Tom Jack Tom And I want to have those results grouped by the name and also include the fraction (ratio) of the occurrence of that name out of the total records returned. So, the desired result would be (as two columns): Tom | 2/3 Jack | 1/3 How would I go about it? Determining the numerator is pretty easy (I can just use COUNT() and GROUP BY name), but I'm having trouble translating that into a ratio out of the total rows returned. Any help is much appreciated!

    Read the article

  • Configure Postfix to send/relay emails Gmail (smtp.gmail.com) via port 587

    - by tom smith
    Hi. Using Centos 5.4, with Postfix. I can do a mail [email protected] subject: blah test . Cc: and the msg gets sent to gmail, but it resides in the spam folder, which is to be expected. My goal is to be able to generate email msgs, and to have them appear in the regular Inbox! As I understand Postfix/Gmail, it's possible to configure Postfix to send/relay mail via the authenticated/valid user using port 587, which would no longer have the mail be seen as spam. I've tried a number of parameters based on different sites/articles from the 'net, with no luck. Some of the articles, actually seem to conflict with other articles! I've also looked over the stacflow postings on this, but i'm still missing something... Also talked to a few people on IRC (Centos/Postfix) and still have questions.. So, i'm turning to Serverfault, once again! If there's someone who's managed to accomplish this, would you mind posting your main.cf, sasl-passwd, and any other conf files that you use to get this working! If I can review your config files, I can hopefully see where I've screwed up, and figure out how to correct the issue. Thanks for reading this, and any help/pointers you provide! ps, If there is a stackflow posting that speaks to this that I may have missed, feel free to point it out to me! -tom

    Read the article

  • Drobo FS vs. MacBook Pro: Finder works, Drobo Dashboard doesn't

    - by dash-tom-bang
    Does anyone have any experience with the new Drobo FS, specifically using it from a MacBook Pro? My experience thus far is this: Set up the Drobo Dashboard software (hereinafter called simply 'Dashboard') on my WinXP machine, which is hard-wired to the network to do the data migration from my NAS-that's-being-replaced (a 250G SimpleShare which works well enough but I was always afraid of losing the one disk). The Dashboard seems to work ok, except that the DroboCopy function doesn't work at all. This is the backup solution, which I can configure, and if I launch it (e.g. to back up from the old NAS to the Drobo) it spins the NAS, seeking the drive all over hell and creation, until finally giving up an hour+ later with zero files copied. Selecting only a subset of the data yields the same effect albeit more quickly. On my Mac I installed the Dashboard software too, since most of my fiddling with the device will be from my couch in the living room. Finder connects to the box just fine, fwiw, but Dashboard just sits there, "waiting for connection." This is considerably more bothersome than the above paragraph, but I figured I'd give whatever information I have. Drobo is insisting that I send them this "Debug Log" file that their software generates. Does anyone know what's in it? It's encrypted and they won't tell me, which spooks me just a bit; not like I'm terribly concerned about privacy but I don't want to be sending personal information out to every clown who says they "need" it in order to help me. thanks a ton, -tom!

    Read the article

  • Windows RDP cannot connect to x64 server from XP SP3+ [closed]

    - by Tom
    Hi all, I have a strange problem that I can't seem to find the answer to anywhere online. The issue has to do with using Windows RDP to connect to our servers. Here is what works: -XP/Vista client (any SPs) connecting to 32-bit Server 2003 machine -XP (SP2 and lower) client conecting to 64-bit Server 2003 machine Here is what does not work: - XP SP3+/Vista client connecting to 64-bit Server 2003 machine It appears that the issue is that XP SP3 and Vista clients cannot connect to x64 Server 2003 boxes. After entering the username/password, we get an error message saying the below, and the connection drops: To log on to this remote computer, you must have Terminal Server User Access persmissions on this computer. By default, members of the Remote Desktop Users group have these permissions. If you are not a member of the Remote Desktop Users group or another group that has these persmissions, or if the Remote Desktop User group does not have these permissions, you must be granted these permissions manually. The issue is that the user is a member of the Administrators group, which has permission. Also, logging in using the same username, but from an XP SP2 machine, has no problems at all. I hope I explained this well enough, and any help/insight that can be given would be greatly appreciated. Thanks, Tom

    Read the article

  • Windows RDP cannot connect to x64 server from XP SP3+

    - by Tom
    Hi all, I have a strange problem that I can't seem to find the answer to anywhere online. The issue has to do with using Windows RDP to connect to our servers. Here is what works: -XP/Vista client (any SPs) connecting to 32-bit Server 2003 machine -XP (SP2 and lower) client conecting to 64-bit Server 2003 machine Here is what does not work: - XP SP3+/Vista client connecting to 64-bit Server 2003 machine It appears that the issue is that XP SP3 and Vista clients cannot connect to x64 Server 2003 boxes. After entering the username/password, we get an error message saying the below, and the connection drops: To log on to this remote computer, you must have Terminal Server User Access persmissions on this computer. By default, members of the Remote Desktop Users group have these permissions. If you are not a member of the Remote Desktop Users group or another group that has these persmissions, or if the Remote Desktop User group does not have these permissions, you must be granted these permissions manually. The issue is that the user is a member of the Administrators group, which has permission. Also, logging in using the same username, but from an XP SP2 machine, has no problems at all. I hope I explained this well enough, and any help/insight that can be given would be greatly appreciated. Thanks, Tom

    Read the article

  • Import exponetial fixed width format data into Excel

    - by Tom Daniel
    I've received a bunch of text data files consiting of Lots of records (30K/file) of 3 fields each of 5-place numbers in exponential format: s0.nnnnnEsee (where s is +/-, n is a digit and ee is the exponent (always 2 digit). When I open the file in Notepad, the format is perfectly uniform throughout each file, but when I import it to Excel using Data|Import|Fixed Width, many of the data values get messed up, no matter what format (text, exponential, various custom tries) I assign to the cells. Looking at the Notepad version, it appears that leading + signs were replaced with a space in the data file, but the sign of the exponential is always there. This means that some fields begin with a space, and this appears to confuse the Excel import routine. I get the same result in Excel 2003 and 2007. I'm sure there's a straightforward solution (hopefully without a messy VBA routine), but I can't figure out what to try next. :-) To clarify (hopefully), here are some input records and the corresponding text input to Excel: Notepad Excel -0.11311E+01 0.10431E-04 0.27018E-03 -0.11311E 1.0431E-05 2.7018E-04 0.19608E+00-0.81414E-02-0.89553E-02 0.19608E -8.1414E-03 8.9553E-03 etc. Whoopee! Solved my own problem - in the spirit of Jeopardy, now that I've begun the question, here's the answer - Use a different "File Origin" - several other than the default "Unicode UTF..." work fine! What a pain. Hope this helps somebody else avoid a few unpleasant hours! Aloha from Kona, Tom

    Read the article

  • vmware - ACE, Workstation - how to manage remoe clients??

    - by tom smith
    Hi. Exploring Vmware products/services and have a few questions. As I understand VM, you can use VMWare Workstation to create a VM of a target machine/box/OS. Let's call this VM, "foo". If I have 100 client PCs in my dept, and I want to install the VM (foo) on each client, and also manage the remote VM instances of (foo). How can I accompish this? Let's assume that the client machines are running Windows7, and have the vmplayer app installed on the box. I'm looking to do the following kinds of actions regarding the remote client machines: -Update the foo VM/image with new updated copies -Make sure that every VM "foo" has the same user, but a unique passwd -Monitor the traffic/status of each client VM "foo" oin each client -Start/Stop each client VN "foo" from the master console -Etc... Can this be accomplished? How would I do it, what services/products would I need? I've tried toalking to a few of the pre-sales guys in VMWare, and got nowhere, other than telling me to email my questions!! Looking at google shed more insight, but I still have questions. So, if you have detailed VMWare understanding, pointers to consultants, or resellers who can help, all pointers are greatly appreciated. Thanks -tom

    Read the article

  • iperf max udp multicast performance peaking at 10Mbit/s?

    - by Tom Frey
    I'm trying to test UDP multicast throughput via iperf but it seems like it's not sending more than 10Mbit/s from my dev machine: C:\> iperf -c 224.0.166.111 -u -T 1 -t 100 -i 1 -b 1000000000 ------------------------------------------------------------ Client connecting to 224.0.166.111, UDP port 5001 Sending 1470 byte datagrams Setting multicast TTL to 1 UDP buffer size: 8.00 KByte (default) ------------------------------------------------------------ [156] local 192.168.1.99 port 49693 connected with 224.0.166.111 port 5001 [ ID] Interval Transfer Bandwidth [156] 0.0- 1.0 sec 1.22 MBytes 10.2 Mbits/sec [156] 1.0- 2.0 sec 1.14 MBytes 9.57 Mbits/sec [156] 2.0- 3.0 sec 1.14 MBytes 9.55 Mbits/sec [156] 3.0- 4.0 sec 1.14 MBytes 9.56 Mbits/sec [156] 4.0- 5.0 sec 1.14 MBytes 9.56 Mbits/sec [156] 5.0- 6.0 sec 1.15 MBytes 9.62 Mbits/sec [156] 6.0- 7.0 sec 1.14 MBytes 9.53 Mbits/sec When I run it on another server, I'm getting ~80Mbit/s which is quite a bit better but still not anywhere near the 1Gbps limits that I should be getting? C:\> iperf -c 224.0.166.111 -u -T 1 -t 100 -i 1 -b 1000000000 ------------------------------------------------------------ Client connecting to 224.0.166.111, UDP port 5001 Sending 1470 byte datagrams Setting multicast TTL to 1 UDP buffer size: 8.00 KByte (default) ------------------------------------------------------------ [180] local 10.0.101.102 port 51559 connected with 224.0.166.111 port 5001 [ ID] Interval Transfer Bandwidth [180] 0.0- 1.0 sec 8.60 MBytes 72.1 Mbits/sec [180] 1.0- 2.0 sec 8.73 MBytes 73.2 Mbits/sec [180] 2.0- 3.0 sec 8.76 MBytes 73.5 Mbits/sec [180] 3.0- 4.0 sec 9.58 MBytes 80.3 Mbits/sec [180] 4.0- 5.0 sec 9.95 MBytes 83.4 Mbits/sec [180] 5.0- 6.0 sec 10.5 MBytes 87.9 Mbits/sec [180] 6.0- 7.0 sec 10.9 MBytes 91.1 Mbits/sec [180] 7.0- 8.0 sec 11.2 MBytes 94.0 Mbits/sec Anybody has any idea why this is not achieving close to link limits (1Gbps)? Thanks, Tom

    Read the article

  • Workaround for datadude deployment bug - NullReferenceException

    - by jamiet
    I have come across a bug in Visual Studio 2010 Database Projects (aka datadude aka DPro aka Visual Studio Database Development Tools aka Visual Studio Team Edition for Database Professionals aka Juneau aka SQL Server Data Tools) that other people may encounter so, for the purposes of googling, I'm writing this blog post about it. Through my own googling I discovered that a Connect bug had already been raised about it (VS2010 Database project deploy - “SqlDeployTask” task failed unexpectedly, NullReferenceException), and coincidentally enough it was raised by my former colleague Tom Hunter (whom I have mentioned here before as the superhuman Tom Hunter) although it has not (at this time) received a reply from Microsoft. Tom provided a repro, namely that this syntactically valid function definition: CREATE FUNCTION [dbo].[Function1]()RETURNS TABLEASRETURN (    WITH cte AS (    SELECT 1 AS [c1]    FROM [$(Database3)].[dbo].[Table1]   )   SELECT 1 AS [c1]   FROM cte) would produce this nasty unhelpful error upon deployment: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.TSqlTasks.targets(120,5): Error MSB4018: The "SqlDeployTask" task failed unexpectedly.System.NullReferenceException: Object reference not set to an instance of an object.   at Microsoft.Data.Schema.Sql.SchemaModel.SqlModelComparerBase.VariableSubstitution(SqlScriptProperty propertyValue, IDictionary`2 variables, Boolean& isChanged)   at Microsoft.Data.Schema.Sql.SchemaModel.SqlModelComparerBase.ArePropertiesEqual(IModelElement source, IModelElement target, ModelPropertyClass propertyClass, ModelComparerConfiguration configuration)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareProperties(IModelElement sourceElement, IModelElement targetElement, ModelComparerConfiguration configuration, ModelComparisonChangeDefinition changes)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareElementsWithoutCompareName(IModelElement sourceElement, IModelElement targetElement, ModelComparerConfiguration configuration, Boolean parentExplicitlyIncluded, Boolean compareElementOnly, ModelComparisonResult result, ModelComparisonChangeDefinition changes)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareElementsWithSameType(IModelElement sourceElement, IModelElement targetElement, ModelComparerConfiguration configuration, ModelComparisonResult result, Boolean ignoreComparingName, Boolean parentExplicitlyIncluded, Boolean compareElementOnly, Boolean compareFromRootElement, ModelComparisonChangeDefinition& changes)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareChildren(IModelElement sourceElement, IModelElement targetElement, ModelComparerConfiguration configuration, Boolean parentExplicitlyIncluded, Boolean compareParentElementOnly, ModelComparisonResult result, ModelComparisonChangeDefinition changes, Boolean isComposing)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareElementsWithoutCompareName(IModelElement sourceElement, IModelElement targetElement, ModelComparerConfiguration configuration, Boolean parentExplicitlyIncluded, Boolean compareElementOnly, ModelComparisonResult result, ModelComparisonChangeDefinition changes)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareElementsWithSameType(IModelElement sourceElement, IModelElement targetElement, ModelComparerConfiguration configuration, ModelComparisonResult result, Boolean ignoreComparingName, Boolean parentExplicitlyIncluded, Boolean compareElementOnly, Boolean compareFromRootElement, ModelComparisonChangeDefinition& changes)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareChildren(IModelElement sourceElement, IModelElement targetElement, ModelComparerConfiguration configuration, Boolean parentExplicitlyIncluded, Boolean compareParentElementOnly, ModelComparisonResult result, ModelComparisonChangeDefinition changes, Boolean isComposing)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareElementsWithoutCompareName(IModelElement sourceElement, IModelElement targetElement, ModelComparerConfiguration configuration, Boolean parentExplicitlyIncluded, Boolean compareElementOnly, ModelComparisonResult result, ModelComparisonChangeDefinition changes)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareElementsWithSameType(IModelElement sourceElement, IModelElement targetElement, ModelComparerConfiguration configuration, ModelComparisonResult result, Boolean ignoreComparingName, Boolean parentExplicitlyIncluded, Boolean compareElementOnly, Boolean compareFromRootElement, ModelComparisonChangeDefinition& changes)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareAllElementsForOneType(ModelElementClass type, ModelComparerConfiguration configuration, ModelComparisonResult result, Boolean compareOrphanedElements)   at Microsoft.Data.Schema.SchemaModel.ModelComparer.CompareStore(ModelStore source, ModelStore target, ModelComparerConfiguration configuration)   at Microsoft.Data.Schema.Build.SchemaDeployment.CompareModels()   at Microsoft.Data.Schema.Build.SchemaDeployment.PrepareBuildPlan()   at Microsoft.Data.Schema.Build.SchemaDeployment.Execute(Boolean executeDeployment)   at Microsoft.Data.Schema.Build.SchemaDeployment.Execute()   at Microsoft.Data.Schema.Tasks.DBDeployTask.Execute()   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)   Done executing task "SqlDeployTask" -- FAILED.  Done building target "DspDeploy" in project "Lloyds.UKTax.DB.UKtax.dbproj" -- FAILED. Done executing task "CallTarget" -- FAILED.Done building target "DBDeploy" in project It turns out there are a certain set of circumstances that need to be met for this error to occur: The object being deployed is an inline function  (may also exist for multistatement and scalar functions - I haven't tested that) That object includes SQLCMD variable references The object has already been deployed successfully Just to reiterate that last bullet point, the error does not occur when you deploy the function for the first time, only on the subsequent deployment.   Luckily I have a direct line into a guy on the development team so I fired off an email on Friday evening and today (Monday) I received a reply back telling me that there is a simple fix, one simply has to remove the parentheses that wrap the SQL statement. So, in the case of Tom's repro, the function definition simpy has to be changed to: CREATE FUNCTION [dbo].[Function1]()RETURNS TABLEASRETURN --(    WITH cte AS (    SELECT 1 AS [c1]    FROM [$(Database3)].[dbo].[Table1]   )   SELECT 1 AS [c1]   FROM cte--) I have commented out the offending parentheses rather than removing them just to emphasize the point. Thereafter the function will deploy fine. I tested this out on my own project this morning and can confirm that this fix does indeed work.   I have been told that the bug CAN be reproduced in the Release Candidate (RC) 0 build of SQL Server Data Tools in SQL Server 2010 so am hoping that a fix makes it in for the Release-To-Manufacturing (RTM) build. Hope this helps @jamiet

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >