Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

£¨c#£©ExcelÓëSqlServer¼äÊý¾ÝÏ໥µ¼Èë

          ÔÚÊý¾Ý¿â±à³ÌÖУ¬³£»áÓöµ½Òª°ÑÊý¾Ý¿â±íÐÅÏ¢µ¼ÈëExcelÖУ¬  ÓÐʱÔòÊǰÑExcelÄÚÈݵ¼ÈëÊý¾Ý¿âÖС£ÔÚÕâÀ½«½éÉÜÒ»ÖֱȽϷ½±ã¿ì½ÝµÄ·½Ê½£¬Ò²ÊÇ±È½ÏÆÕ±éµÄ¡£Æäʵ£¬Õâ·½·¨Äã²¢²»Ä°Éú¡£Ô­ÀíºÜ¼òµ¥£¬°ÑÊý¾Ý¿â±í»òExcelÄÚÈݶÁÈ¡µ½datasetÀàÐ͵ıäÁ¿ÖУ¬ÔÙÖðÌõ²åÈëµ½ÄãÏëÒªµ¼ÈëµÄµØ·½¡£²»¹ÜÊÇExcelתSqlServer£¬»¹ÊÇSqlServerתExcel£¬Ò²ÊÇÊÊÓõġ£
          Æäʵ£¬ExcelµÄÒ²¿ÉÒÔÓÃsqlÓï¾äÀ´²Ù×÷µÄ¡£Ëµµ½ÕâÀÄãÒ²´ó¸ÅÖªµÀÔõÑù×ö°É£¡½ÓÏÂÀ´£¬Í¨¹ýÒ»¸öʵÀýÀ´ÂýÂý½²½â¡£(¸ÃʵÀýÏÂÔØµØÖ·)
          Ê×ÏÈ£¬Ìṩ¸ÃʵÀýµÄÊý¾Ý¿âºÍ±í£º
          Êý¾Ý¿âÃûΪ£ºMyDataBase
          ±íÃûΪ£º      CutClassTable
          ±í´´½¨Óï¾äÈçÏ£º
use MyDataBase
go
Create Table CutClassTable(
StudentID varchar(20) Primary key,
Name varchar(20) not null,
CutClassSum int default(0),
Cause varchar(200) default('δ֪')
)

         ¸ÃʵÀýÔËÐÐͼ£º
       
         Ò».Excel µ¼Èëµ½ SqlServer
            ´ó¸Å²½Ö裺
           a.ÓÃsqlÓï¾äÖГselect * from [Sheet1$]”Óï¾ä»ñÈ¡ ExcelÄÚÈÝ£¬´æ·Åµ½datasetÀàÐͱäÁ¿ÖС£
           b.ÓÃinsert Óï¾ä°ÑdatasetÄÚÈݲåÈëµ½SqlServerÀïÃæ¡£
        Ô´´úÂëÈçÏ£º
using System.Data.SqlClient; //ÓÃÓÚSqlServerÊý¾Ý¿â²Ù×÷
using System.Data.OleDb; //ÓÃÓÚExcelÊý¾Ý¿â²Ù×÷
#region Excelµ¼Èëµ½Sqlserver
//Ö¸¶¨µÄExcelÎļþÃû
private string strFileName;
//ÊÇ·ñÒѾ­»ñÈ¡µ½ExcelÎļþµÄ·¾¶
private bool hasFile;
/


Ïà¹ØÎĵµ£º

c#ÓïÑÔ²Ù×÷AccessÊý¾Ý¿â

±¾ÎĽ«c#ÓïÑÔ²Ù×÷AccessÊý¾Ý¿âµÄ·½·¨¼ÓÒÔ×ܽᣬÖ÷Òª½â¾öµÄÎÊÌâÈçÏ£º
´´½¨mdb
´´½¨table
¶ÁÈ¡tableÄÚÈÝ
²é
ѯtableÖеÄÄÚÈÝ
ÏòtableÖвåÈëÊý¾Ý
ɾ³ýtableÖеļǼ
ÏòtableÖвåÈëÕÕÆ¬
¶ÁÈ¡tableÖеÄÕÕÆ¬µÈ¡£
ÎÄ
½éÉÜC#
·ÃÎʲÙ×÷AccessÊý¾Ý¿âµÄ»ù´¡ÖªÊ¶£¬²¢Ìá
¹©Ò»¸öÏà¹ØµÄÀý³Ì¡£C#µÄADO.NET»¹²»ÄÜͨ¹ý±à³Ì·½Ê½´ ......

c#ÖеÄAjaxÉÏÊÖÆª£­£­£­·Çͬ²½ÇëÇóresponseXML

ÎÒÃÇ¿ÉÒÔʹÓÃXML×÷ΪÊý¾Ý´«ËÍ¡¢¹µÍ¨µÄ¸ñʽ£¬Ajax¿Í»§¶ËÈôÒª·¢ËÍXML£¬»ù±¾ÉϾÍÊǽ«XML×÷Ϊ×Ö·û´®£¬ÔÚPOSTÇëÇóʱ·¢ËÍ£¬ÀýÈ磺
*HelloAjax.js
view plaincopy to clipboardprint?
var xmlHttp;  
function createXMLHttpRequest() {  
    if (window.XMLHttpRequest) {   ......

C#²Ù×÷¸÷ÖÖÖ´ÐÐsqlµÄ·½·¨º¬´æ´¢¹ý³Ì²Ù×÷

using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Xml;
using System.Data;
namespace MyDbTest
{
class Program
{
static void Main(string[] args)
{
SqlConnection thisConnection = new SqlConnection(
@ ......

JAVAÓëC#±È½Ï

C#ÓëJAVAµÄÏà֮ͬ´¦:ÓÉÓÚC#ÓëJAVA¶¼ÊÇ»ùÓÚC++·¢Õ¹ÆðÀ´µÄ,Òò´Ë¶þÕßÖ®¼ä¾ßÓкܶàÏàËÆÖ®´¦,¾ßÌåÈçÏÂ:
¡¡¡¡1¡¢C#ºÍJAVAÓïÑԵıàÒë½á¹ûÊǶÀÁ¢ÓÚ¼ÆËã»úºÍ±à³ÌÓïÑԵģ¬¿ÉÖ´ÐÐÎļþ¿ÉÒÔÔÚÊܹÜÀíµÄÖ´ÐÐ
¡¡¡¡»·¾³ÖÐÖ´ÐУ»
¡¡¡¡2¡¢C#ºÍJAVAÓïÑÔ¶¼ÊDzÉÓÃÁË×Ô¶¯µÄÀ¬»ø»ØÊÕ»úÖÆ£»
¡¡¡¡3¡¢C#ºÍJAVAÓïÑÔ¶¼È¡ÏûÁËÖ¸Õë²Ù×÷£»
¡¡¡¡4¡¢ ......

sqlserverºÍmysqlµÄÐÐתÁÐͨÓô洢¹ý³Ì

sqlserverÖУº
  1 /*
  2 1 * Description:¶ÔÊý¾Ý±í½øÐÐÐÐÁÐת»»
  3 2 * Author:llf
  4 3 * µ÷ÓÃ˵Ã÷£ºexec SP_RowChangeCol 'ѧÉú³É¼¨±í','ÐÕÃû','¿Î³Ì','·ÖÊý','desc',0,0,'where Äê¼¶=''Ò»Äê¼¶'''
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ