我需要为现在在Linux上运行的WebApiCore应用程序编写连接字符串。
我尝试过这样的事情:
<a href="detail">
但我总是会收到此错误:
System.Data.SqlClient.SqlException(0x80131904):与网络相关或 建立与以下对象的连接时发生特定于实例的错误 SQL Server。服务器未找到或无法访问。校验 实例名称正确并且已将SQL Server配置为 允许远程连接
我做错了什么或我想念什么?
我认为问题出在for dog in dogs:
url_detail = url_for('detail')
htmlDog = htmlDog + '<div class="col-lg-4 col-md-6 col-sm-12 mt-3">
<div class="animal_block mx-2"><img alt="animal image" src="' +
str(dog[6]) + '" class="img-fluid img-thumbnail" />
<div class="text-center">' + str(dog[0]) + '</div><div>Lorem ipsum dolor sit
amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua...</div><div class="text-center">
<a href=' + url_detail + '>look detail</a></div><span
class="animal_id">1</span></div></div>'
def home():
return render_template(
"index.html",
content = htmlDogs,
)
I have to call some function to encode htmlDog or use something different of render_template?
关键字上,但是我不知道该怎么用
感谢您的帮助
答案 0 :(得分:1)
看起来您的问题与MySQL有关,但是客户端正在尝试连接到SQL Server数据库。