国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
c#+sql

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 WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        private static string ConnectionString = "Data Source=MICROSOF-44BEF0;Initial Catalog=追蹤;user id=sa;password=zzw848686;";
        private SqlConnection conn = null;
        private SqlCommand cmd = null;
        private SqlDataAdapter sda = null;
        private DataSet ds=null;

        public Form1()
        {
            InitializeComponent();
            conn = new SqlConnection(ConnectionString);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (conn.State != ConnectionState.Open)
                conn.Open();
            try
            {
                string sql = "select * from Tracker";
                DataSet ds = new DataSet();
                cmd = new SqlCommand(sql, conn);
                cmd.ExecuteNonQuery();
                sda = new SqlDataAdapter();
                sda.SelectCommand = cmd;
                sda.Fill(ds);
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    double x = 0;
                    x = Convert.ToDouble(ds.Tables[0].Rows[i]["Latitude"]);
                    string sx = Convert.ToString(x);
                    MessageBox.Show(sx);
                }
               
                //sda = new SqlDataAdapter();
                //sda.SelectCommand = cmd;
                //sda.Fill(ds);
                //dataGridView1.DataSource = ds.Tables[0];             
            }
            catch
            {

            }
        }

}

}

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
asp.net程序異常處理代碼
C# 數(shù)據(jù)表格(DataGridView)控件的應(yīng)用案例
C#中comm5種處理SQL語句方法
C#中用SqlDataAdapter修改數(shù)據(jù)庫中的表(源碼+注意的細(xì)節(jié))
為ASP.NET封裝的SQL數(shù)據(jù)庫訪問類
SqlCommand和SqlDataAdapter的區(qū)別
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服