SqlConnection sqlCon = new SqlConnection("Data Source=.\\data\\PPCData.sdf");
sqlCon.Open();
string str = "select * form CardInfo where id=1";
SqlCommand com = new SqlCommand(str, sqlCon);
int intcont = Convert.ToInt32(com.ExecuteScalar());
sqlCon.Close();
return intcont;
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.SqlServerCe;
namespace testc
{
public partial class Form1 : Form
{