国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 開(kāi)發(fā) > 綜合 > 正文

異構(gòu)數(shù)據(jù)庫(kù)之間的導(dǎo)入導(dǎo)出

2024-07-21 02:10:33
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
  • 本文來(lái)源于網(wǎng)頁(yè)設(shè)計(jì)愛(ài)好者web開(kāi)發(fā)社區(qū)http://www.html.org.cn收集整理,歡迎訪(fǎng)問(wèn)。
  • 異構(gòu)數(shù)據(jù)庫(kù)之間的導(dǎo)入導(dǎo)出

    //mssql2excel
    adoconnection1.connectionstring:=
    'provider=microsoft.jet.oledb.4.0;data source=g:/mysmallexe/excel2sql/yp.xls;'
    +'extended properties=excel 8.0';
    adoconnection1.execute('select * into [abc] from drug_yk in [odbc] [odbc;driver=sql

    server;uid=sa;pwd=kcsoft58;server=127.0.0.1;database=kcsoft_his]');
    //把一個(gè)mssql的數(shù)據(jù)庫(kù)表及數(shù)據(jù)導(dǎo)出到excel中,abc為excel中不存在的表名,drug_yk為mssql里的表, sa為

    用戶(hù),  kcsoft58為密碼 , 127.0.0.1為服務(wù)大地址 ,kcsoft_his是數(shù)據(jù)庫(kù)名稱(chēng)
    adoconnection1.execute('insert into [abc] select * from drug_yk in [odbc] [odbc;driver=sql

    server;uid=sa;pwd=kcsoft58;server=127.0.0.1;database=kcsoft_his]');
    //把一個(gè)mssql的數(shù)據(jù)庫(kù)表的記錄增加到到excel中,執(zhí)行以后相當(dāng)于兩倍量的數(shù)據(jù),一次是導(dǎo)入,一次是

    insert


    //excel2mssql
      adoconnection1.connectionstring:='provider=sqloledb.1;password=kcsoft58;persist security

    info=true;user id=sa;initial catalog=kcsoft_his;data source=chen';
       adoconnection1.execute('select * into [abc] from opendatasource( '
       +quotedstr('microsoft.jet.oledb.4.0')+','
       +quotedstr('data source="g:/mysmallexe/excel2sql/yp.xls";extended properties=excel 8.0')

    +')...[abc]');


    //mssql2vfp
      adoconnection2.connectionstring:=
    'provider=microsoft.jet.oledb.4.0;data source=g:/mysmallexe/excel2sql;'
    +'extended properties=dbase 5.0';
    adoconnection2.execute('select * into abc.dbf from drug_yk in [odbc] [odbc;driver=sql

    server;uid=sa;pwd=kcsoft58;server=127.0.0.1;database=kcsoft_his]');
    //把一個(gè)mssql的數(shù)據(jù)庫(kù)表及數(shù)據(jù)導(dǎo)出到vfp中,abc.dbf 為vfp中不存在的表名,drug_yk為mssql里的表, sa為

    用戶(hù),  kcsoft58為密碼 , 127.0.0.1為服務(wù)大地址 ,kcsoft_his是數(shù)據(jù)庫(kù)名稱(chēng)


    //vfp2mssql
       adoconnection2.connectionstring:='provider=sqloledb.1;password=kcsoft58;persist security

    info=true;user id=sa;initial catalog=kcsoft_his;data source=chen';
       adoconnection2.execute('select * into [abc] from opendatasource( '
       +quotedstr('microsoft.jet.oledb.4.0')+','
       +quotedstr('data source="g:/mysmallexe/excel2sql";extended properties=dbase 5.0')+')...

    [abc]');


     //mssql2access
         adoconnection2.connectionstring:=
    'provider=microsoft.jet.oledb.4.0;data source=g:/mysmallexe/excel2sql/server.mdb;'
    +'persist security info=false;jet oledb:database password=happynewyear';
    adoconnection2.execute('select * into abc from drug_yk in [odbc] [odbc;driver=sql

    server;uid=sa;pwd=kcsoft58;server=127.0.0.1;database=kcsoft_his]');


    //access2mssql
      adoconnection2.connectionstring:='provider=sqloledb.1;password=kcsoft58;persist security

    info=true;user id=sa;initial catalog=kcsoft_his;data source=chen';
       adoconnection2.execute('select * into [abc] from opendatasource( '
       +quotedstr('microsoft.jet.oledb.4.0')+','
       +quotedstr('data source="g:/mysmallexe/excel2sql/server.mdb";jet oledb:database

    password=happynewyear')+')...[abc]');


    //excel2access
        adoconnection2.connectionstring:=
    'provider=microsoft.jet.oledb.4.0;data source=g:/mysmallexe/excel2sql/server.mdb;'
    +'persist security info=false;jet oledb:database password=happynewyear';
    adoconnection2.execute('select * into [abc] from [excel

    8.0;database=g:/mysmallexe/excel2sql/yp.xls].[abc$]');

    //access2excel
       adoconnection2.connectionstring:=
    'provider=microsoft.jet.oledb.4.0;data source=g:/mysmallexe/excel2sql/yp.xls;'
    +'extended properties=excel 8.0';
    adoconnection2.execute('select * into abc  from

    [g:/mysmallexe/excel2sql/server.mdb;pwd=happynewyear].abc');


    //mssql2txt
     adoconnection2.connectionstring:=
    'provider=microsoft.jet.oledb.4.0;data source=g:/mysmallexe/excel2sql;'
    +'extended properties=text';
    adoconnection2.execute('select * into abc#txt from drug_yk in [odbc] [odbc;driver=sql

    server;uid=sa;pwd=kcsoft58;server=127.0.0.1;database=kcsoft_his]');


    //txt2mssql
       adoconnection2.connectionstring:='provider=sqloledb.1;password=kcsoft58;persist security

    info=true;user id=sa;initial catalog=kcsoft_his;data source=chen';
        adoconnection2.execute('select * into [abc] from opendatasource( '
       +quotedstr('microsoft.jet.oledb.4.0')+','
       +quotedstr('data source="g:/mysmallexe/excel2sql";extended properties=text')+')...<

    發(fā)表評(píng)論 共有條評(píng)論
    用戶(hù)名: 密碼:
    驗(yàn)證碼: 匿名發(fā)表
    主站蜘蛛池模板: 黄平县| 原阳县| 甘孜县| 双江| 凭祥市| 鄯善县| 定兴县| 保亭| 雅安市| 永兴县| 东乌| 遂川县| 彭水| 太原市| 利辛县| 蕉岭县| 潞西市| 西林县| 昭通市| 乌拉特中旗| 黔东| 筠连县| 宜章县| 襄樊市| 鄂托克旗| 安平县| 华宁县| 贵州省| 阿尔山市| 察雅县| 泗洪县| 云南省| 肃宁县| 伊宁市| 定日县| 蒲江县| 景德镇市| 东台市| 木里| 化州市| 丰城市|