⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄

📁 C语言操作ADO数据库 这些操作是对一个微软Access 2000数据库进行的,但是SQL或是其它 ADO数据源可以通过简单的改变连接字符串来使用.
💻
字号:
			//Open Connection. 
			SqlConnection con = new SqlConnection("server=glf;uid=sa;pwd=;database=northwind");

			//Set the DataAdapter's query.
			da = new SqlDataAdapter("select * from customers", con);
			ds = new DataSet();

			//Fill the DataSet.
			da.Fill(ds, "customers");

			//Set the source table.
			dtSource = ds.Tables["customers"];
			//
			// Set the start and max records. 
			//pageSize = Convert.ToInt32(txtPageSize.Text);
			pageSize=20;
			maxRec = dtSource.Rows.Count;
			PageCount = maxRec / pageSize;

			//Adjust the page number if the last page contains a partial page.
			if ((maxRec % pageSize) > 0) 
			{
				PageCount += 1;
			}

			// Initial seeings
			currentPage = 1;
			recNo = 0;

			// Display the content of the current page.
			LoadPage();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -