第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

如下代碼運(yùn)行后,顯示問題出錯(cuò)```不支持關(guān)鍵字:?為什么呢?

如下代碼運(yùn)行后,顯示問題出錯(cuò)```不支持關(guān)鍵字:?為什么呢?

侃侃無極 2022-04-08 17:07:54
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace 測(cè)試2{public partial class Form1 : Form{public Form1(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){//Data Source=L_RYAN-PC\SQLEXPRESS;Initial Catalog=test;Integrated Security=Truestring ConnectionString = "SIMON-PC\\SQLEXPRESS\\SQLEXPRESS;Initial Catalog=Hospetal;Integrated Security=True";using(SqlConnection conn = new SqlConnection())//創(chuàng)建連接對(duì)象{conn.ConnectionString = ConnectionString;//給連接對(duì)象的連接路徑賦值conn.Open();//運(yùn)行連接對(duì)象,即是連接數(shù)據(jù)庫SqlCommand cmd = new SqlCommand();//創(chuàng)建命令對(duì)象cmd.Connection = conn;//命令對(duì)象通過連接對(duì)象連接數(shù)據(jù)庫發(fā)送命令cmd.CommandText = "insert into 病人 values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')";//命令對(duì)象發(fā)送命令的原文本int i = cmd.ExecuteNonQuery();//運(yùn)行命令對(duì)象MessageBox.Show("插入成功!");}}private void textBox1_TextChanged(object sender, EventArgs e){}}}
查看完整描述

1 回答

?
滄海一幻覺

TA貢獻(xiàn)1824條經(jīng)驗(yàn) 獲得超5個(gè)贊

string ConnectionString = "server=SIMON-PC\\SQLEXPRESS\\SQLEXPRESS;Initial Catalog=Hospetal;Integrated Security=True";

查看完整回答
反對(duì) 回復(fù) 2022-04-11
  • 1 回答
  • 0 關(guān)注
  • 224 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)