语法的含义 [英] meaning of syntax

查看:119
本文介绍了语法的含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

m nw语法的含义:

cmd.connection = con;

n在哪里使用??? :sigh:

m nw in asp.net plzzz tel me d meaning of syntax:

cmd.connection=con;

n where to use it??? :sigh:

推荐答案

首先,请使用适当的词语,等等.

此代码段看起来像已将SQL命令对象实例化并分配给cmd.

实例化了一个数据连接,并为其指定了名称con.

因此,命令对象被告知正在使用哪个连接.
cmd.connection = con;

鉴于有一个事实;最后建议这也已使用C#进行了编码.

开心吗?
Firstly, Use proper words, please, the, etc.

This code snippet looks like a SQL command object has been instanced and assigned to cmd.

A data connection has been instanced and assigned the name con.

So, the command object is being told which connection is being used.
cmd.connection=con;

Giventhe fact there is a ; at the end would suggest that this has also been coded using C#.

Happy?


您可能需要先学习基本拼写的含义.我们可以稍后再处理诸如语法和语法之类的事情.
You may need to learn the meaning of basic spelling first. We can work on things such as syntax and grammar at a later date.


该示例向您展示了这是什么意思:http://www.java2s.com/Code/VB/Database-ADO.net/Connectionstatechangeevent.htm

并尝试使用将VB.Net转换为C# [
this example show you what this mean : http://www.java2s.com/Code/VB/Database-ADO.net/Connectionstatechangeevent.htm

and try to use VB.Net to C#[^] for you got :

32	        con = new SqlConnection("Server=(local)\\SQLEXPRESS;Initial Catalog=MyDatabase;Integrated Security=SSPI");
33	 
34	        SqlCommand cmd = new SqlCommand();
35	        cmd.CommandText = "SELECT TOP 5 FirstName, LastName FROM Employee";
36	        cmd.Connection = con; // YOU ARE HERE ^_^
37	 


这篇关于语法的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆