[英]Problem with sql for a webpage built in C# by using Microsoft Visual Studio 2010
Me and my friend were trying to make a webpage in C#.我和我的朋友试图在 C# 中制作一个网页。 This webpage has features like log in, log out and register.该网页具有登录、注销和注册等功能。 So we tested it on his computer, and everything worked fine.所以我们在他的电脑上进行了测试,一切正常。
But then when I tried to test the code on my computer, I think the.sql file has some errors.但是当我尝试在我的计算机上测试代码时,我认为.sql 文件有一些错误。
Some of them are:他们之中有一些是:
I have no idea if I am missing something like heading or setting.我不知道我是否缺少标题或设置之类的东西。 I searched in google and added "using System.Data.SqlClient;"我在谷歌搜索并添加了“使用 System.Data.SqlClient;” to every aspx pages but nothing helped.到每个 aspx 页面,但没有任何帮助。
I hope you guys know what problem is this.希望大家知道这是什么问题。 Thank you.谢谢你。
The Problem looks to be that when you pasted it it replaced apostrophes with a different character that looks similar to apostrophes as well as double quotes with a similar character, this sometimes happens when you copy and paste from somewhere.问题看起来是,当您粘贴它时,它用看起来类似于撇号的不同字符替换撇号以及具有相似字符的双引号,当您从某个地方复制和粘贴时,有时会发生这种情况。 Go into sql and do a find and replace (ctrl + H) in the script by copying the incorrect character to clipboard and replacing it with the correct character. Go 到 sql 并通过将不正确的字符复制到剪贴板并用正确的字符替换它来在脚本中执行查找和替换 (ctrl + H)。
If you're trying to run this against a MS SQL Server, you're going to have problems.如果您尝试针对 MS SQL 服务器运行此程序,您将遇到问题。 That syntax is MySQL.该语法是 MySQL。 The give away for me is "ENGINE=MyISAM", but there are other constructs in there that T-SQL (the language that is used to run commands against SQL Server) don't have.对我来说,赠品是“ENGINE=MyISAM”,但其中还有其他 T-SQL(用于针对 SQL 服务器运行命令的语言)没有的构造。 You'll have to get rid of those (or convert them) in order to accomplish what you're trying to do.您必须摆脱这些(或转换它们)才能完成您想要做的事情。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.