主题:求助-把变量写入到数据库字段
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
int s=0;
public void Exp()
{
while (s < 100)
{
s++;
textBox1.Text = s.ToString();
Application.DoEvents();
//请帮我加把S值写入数据库字段的代码
}
}
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Exp();
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
int s=0;
public void Exp()
{
while (s < 100)
{
s++;
textBox1.Text = s.ToString();
Application.DoEvents();
//请帮我加把S值写入数据库字段的代码
}
}
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Exp();
}
}
}