首页 \ 问答 \ 用于Node.js SQL Azure提供程序的Windows Azure SDK(Windows Azure SDK for Node.js SQL Azure Provider)

用于Node.js SQL Azure提供程序的Windows Azure SDK(Windows Azure SDK for Node.js SQL Azure Provider)

我想使用适用于Windows Azure的Node.js SDK连接到SQL Azure,但是没有关于如何设置它的教程。 有人知道如何使用Node.js与SQL Azure数据库通信吗?

谢谢


I want to connect to SQL Azure using Node.js SDK for Windows Azure but there are no tutorials about how to set it up. Does anybody know how I can talk to a SQL Azure DB using Node.js?

Thanks


原文:https://stackoverflow.com/questions/10752898
更新时间:2022-10-21 07:10

最满意答案

这里的问题是你与赋值混淆的比较。

Function(x) x.Cost = GetPartCost ...

这编译到x.CostGetPartCost之间的比较而不是赋值。 之所以这样, Function (x)是一个表达式lambda,当在表达式的上下文中使用时=是比较而不是赋值。

为了解决这个问题,使用语句/ Sub来产生分配语义

Sub(x) x.Cost = GetPartCost ...

注意:直到Visual Studio 2010才能使用Sub lambda表达式。


The problem here is your confusing comparison with assignment.

Function(x) x.Cost = GetPartCost ...

This compiles down to a comparison between x.Cost and GetPartCost not an assignment. The reason why is that Function (x) is an expression lambda and when used in the context of an expression = is comparison not assignment.

To fix this use a statement / Sub to produce assignment semantics

Sub(x) x.Cost = GetPartCost ...

Note: Sub lambdas aren't available until Visual Studio 2010.

相关问答

更多
  • 确实没有了 列表 .ForEach已在Metro风格的应用程序中删除。 虽然该方法看起来很简单,但是当列表被传递给ForEach的方法变异时,它有一些潜在的问题。 相反,建议您只需使用foreach循环。 Wes Haggard | .NET Framework Team(BCL)| http://blogs.msdn.com/b/bclteam/ 然而,很奇怪的是,它在文档中出现,在这个文件中 ,它无法声明.NET的Windows Store应用程序(以前的.NET for Metro风格的应用程序 ...
  • 事实证明,问题是由LEFT功能截断的字段引起的: LEFT(Spare6+space(56),55) 所以我改成了 LEFT(Spare6+space(57),57) 现在它的工作原理。 it turns out that the problemwas caused by the field being truncated by the LEFT function: LEFT(Spare6+space(56),55) so I changed it to LEFT(Spare6+space(57 ...
  • 您需要在循环外部实例化列表: var list = new List(); foreach (Match match in matches) { GroupCollection groups = match.Groups; var tc = new TwitterCollection { origURL = groups[0].Value.ToString(), txtDesc = res.text, ...
  • 问题是您正在更改原始列表persons 改变这个: List personsToAssign = persons; 至: List personsToAssign = new List (persons); 您没有复制列表,只需设置对它的引用即可。 因此,如果您从personsToAssign删除某个人,您也会将其从persons删除,因为两个变量都指向内存中的相同列表。 The problem is that you are changing your ...
  • 这里的问题是你与赋值混淆的比较。 Function(x) x.Cost = GetPartCost ... 这编译到x.Cost和GetPartCost之间的比较而不是赋值。 之所以这样, Function (x)是一个表达式lambda,当在表达式的上下文中使用时=是比较而不是赋值。 为了解决这个问题,使用语句/ Sub来产生分配语义 Sub(x) x.Cost = GetPartCost ... 注意:直到Visual Studio 2010才能使用Sub lambda表达式。 The proble ...
  • 你重载了equals而不是重载它。 要覆盖Object的equals方法,必须使用相同的签名,这意味着参数必须是Object类型。 改成: @Override public boolean equals(Object other){ if (!(other instanceof Animal)) return false; Animal otherAnimal = (Animal) other; return (this.legs==otherAnimal.legs) ...
  • 您编写了一个比较器,当两个评论的ID相等时,两个评论相同,但您没有修改哈希码。 两个相同的评论应该生成相同的哈希码而你的不是。 实现它的最简单方法是为相同的评论返回相同的哈希码。 例如,通过使用唯一使两个评论相等的哈希码,ID: public class ReviewComparer : IEqualityComparer { public bool Equals(Review x, Review y) { return x.ReviewID == y.Rev ...
  • 我找到了一个简单的解决方案:不要在小部件的扩展中包含更新功能。 核心只返回$ new_instance变量作为默认值(wp-includes / widgets.php): function update($new_instance, $old_instance) { return $new_instance; } 我已经在我自己的小部件中成功测试了这一点,并确定制作自己的更新功能对于过滤用户输入很有用,但似乎没有必要。 I have found a simple solution: do not ...
  • 对于相当复杂的迭代和替换逻辑,惯用法将是这样的: @tailrec def idiomaticWay(list: List[Instruction], acc: List[Instruction] = List.empty): List[Instruction] = list match { case WhileStmt() :: tail => // add element to head of acc idiomaticWay(tai ...
  • 在第二个查询中,您有一个外部联接。 在第一个查询中,您没有任何类型的连接; 你只需要从t中选择一个where子句,其中t.id之后有一个(+)。 我不知道为什么语法不会返回错误; 但是当t中不存在d.id时,该子查询不返回任何行,这就是当更新值应该是标量子查询的输出时更新的工作方式:如果子查询没有返回任何行,则update语句将更新NULL字段。 你没有要求一种不同的方式来使更新工作,但如果你想看到一个,这里就是。 毫无疑问,你知道如何做到这一点; 为其他论坛成员的利益提供它。 update d_dim ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)