不是吧 还有用foxpro得 什么咚咚要用到这个

解决方案 »

  1.   

    没有驱动,好像不行吧,用sql2000把foxpro的数据导入,再用sql2000
    做技术的和做管理的永远都很难沟通
    给他们做做思想工作,这也是你的能力,只会做技术也不行啊.
      

  2.   

    题目补充 题目补充 题目补充 题目补充  题目补充  题目补充  题目补充  题目补充  
    题目补充 题目补充 题目补充 题目补充  题目补充  题目补充  题目补充
    必须用ADO方式连接。
      必须用ADO方式连接。
        必须用ADO方式连接。
           必须用ADO方式连接。
               必须用ADO方式连接。
                  必须用ADO方式连接。
                      必须用ADO方式连接。
                          必须用ADO方式连接。
                              必须用ADO方式连接。
      

  3.   

    ASP的,参考一下.先将文件上传到服务器.
    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    </HEAD>
    <BODY bgColor=LavenderBlush>
    <%
    noError=false
    rq=request("rq")
    getFname=Request.QueryString ("fNAME") 
    getTable=Request.QueryString ("Tname")
    if getFname<>"" and isdate(rq) then
    noError=true
    rq=right(year(getrq),2)
    Response.Write rq
    Response.Write noError
    end if
    if noError=true then dim j
    j=0
    Set ConnExl = Server.CreateObject("ADODB.Connection") dim excName
    excName=""
    excName=(right(getFname,LEN(getFname)-instrRev(getFname,".")))
    if excName="xls" then
    ConnstringExl = "DRIVER={Microsoft Excel Driver (*.xls)};MaxScanRows=14;MaxBufferSize=2048;DBQ="&cstr(server.MapPath(getFname)) 
        SQLSTR="[表1$]"
    Response.Write SQLSTR
    end if
    if excName="dbf" then
    pathAndFile=cstr(server.MapPath(getFname))
    fullpath=(left(pathAndFile,instrRev(pathAndFile,"\")))
    ConnstringExl = "DRIVER={Microsoft dBase Driver (*.dbf)};DBQ="&cstr(fullpath) 
    SQLSTR=trim(getFname)
    end if
    ConnExl.open(ConnstringExl)

    Set report_rst = Server.CreateObject("ADODB.Recordset")
    set repot_cmd=Server.CreateObject("ADODB.Command")
    repot_cmd.CommandText="SELECT * FROM  "&SQLSTR
    repot_cmd.ActiveConnection=connExl 
    set report_rst=repot_cmd.Execute
     
    mc=report_rst.Fields(0).name
    Response.Write  report_rst.Fields.Count-1

    %>
    <p align=center><font size=5 color=red><b>本次成功导入的数据信息</b></p>
     <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#ffcc99">
      <tr>
        <td width="7%" rowspan="3" bgcolor="#ccffcc" style="COLOR: #0000ff">单位</td>
        <td width="7%" rowspan="3" bgcolor="#ccffcc" style="COLOR: #0000ff">总计</td>
        <td width="21%" colspan="3" align="middle" bgcolor="#ccffcc" style="COLOR: #0000ff">耕地</td>
        <td width="21%" colspan="3" align="middle" bgcolor="#ccffcc" style="COLOR: #0000ff">林地</td>
        <td width="21%" colspan="3" align="middle" bgcolor="#ccffcc" style="COLOR: #0000ff">水面</td>
        <td width="7%" rowspan="3" align="middle" bgcolor="#ccffcc" style="COLOR: #0000ff">草场</td>
        <td width="16%" colspan="2" align="middle" bgcolor="#ccffcc" style="COLOR: #0000ff">土地资源</td>
      </tr>
      <tr>
        <td width="7%" rowspan="2" bgcolor="#ccffcc" style="COLOR: #0000ff">合计</td>
        <td width="14%" colspan="2" bgcolor="#ccffcc" style="COLOR: #0000ff">
          <P align=center>其中</P></td>
        <td width="7%" rowspan="2" bgcolor="#ccffcc" style="COLOR: #0000ff">
          <P align=center>合计</P></td>
        <td width="14%" colspan="2" bgcolor="#ccffcc" style="COLOR: #0000ff">
          <P align=center>其中</P></td>
        <td width="7%" rowspan="2" bgcolor="#ccffcc" style="COLOR: #0000ff">
          <P align=center>合计</P></td>
        <td width="14%" colspan="2" bgcolor="#ccffcc" style="COLOR: #0000ff">
          <P align=center> 其中</P></td>
        <td width="8%" rowspan="2" bgcolor="#ccffcc" style="COLOR: #0000ff">可垦荒地</td>
        <td width="8%" rowspan="2" bgcolor="#ccffcc" style="COLOR: #0000ff">其他</td>
      </tr>
      <tr>
        <td width="7%" bgcolor="#ccffcc" style="COLOR: #0000ff">旱田</td>
        <td width="7%" bgcolor="#ccffcc" style="COLOR: #0000ff">水田</td>
        <td width="7%" bgcolor="#ccffcc" style="COLOR: #0000ff">用林地</td>
        <td width="7%" bgcolor="#ccffcc" style="COLOR: #0000ff">果园</td>
        <td width="7%" bgcolor="#ccffcc" style="COLOR: #0000ff">人工</td>
        <td width="7%" bgcolor="#ccffcc" style="COLOR: #0000ff">自然</td>
      </tr>
    <%
    Redim getValue(report_rst.Fields.Count-1) For k=0 to report_rst.Fields.Count-1
       getValue(k)=0 
    Next
    k=0
    Do while Not report_rst.EOF
    k=k+1
    'if k>3 then
    %>
    <tr>
    <%For i=0 To report_rst.Fields.Count-1%>
        <%getValue(i)=report_rst.Fields(i).Value
              
      If isNull(getValue(i))  Then
         
         getValue(i)=0
      End If   
    %>
       <td>
       <%=report_rst.Fields(i).value%><%="dd"%>&nbsp;
        
       </td>
       <%Next%> 
    </tr>

    <%
    '//=-=-=-=-=-=-=-=-=-=-=-=《 在此定义不同类别的不同处理方法 》=-=-=-=-=-=-=-=-=-=-=-=-=-=-= orderChar=""  
    if getkc=true then
    bcount=1
    else
    bcount=0
    end if For i=bcount to report_rst.Fields.Count-1
    orderChar=orderChar+","+"'"+Cstr(getValue(i))+"'"  
          
    Next '-------------------End
    '----------------------------------=*O 添加数据 O*=-------------------------------
    If j>=0 Then
    if j=4 then
       Session("DataCmd").CommandText="select max(right(序号,4))+1 as bm from "+trim(getTable)+" "
    Response.Write (Session("DataCmd").CommandText)
    Set Session("DataCmd").ActiveConnection=Session("DataConn")
    Set Session("rs_main")=Session("DataCmd").Execute
    if  (not Session("rs_main").eof) and (not isnull(Session("rs_main")("bm")))then
    tem=right("0000"+cstr(Session("rs_main")("bm")),4)
    else
    tem="0001"
    'Session("DataCmd").CommandText="update "+Trim(getTable)+" set 平均气温='"&getvalue(1)&"',降水量='"&getvalue(2)&"',地面平均气温='"&getvalue(3)&"',地下5CM平均地温='"&getvalue(4)&"',地下10CM平均地温='"&getvalue(5)&"',日照时数='"&getvalue(6)&"',平均蒸发量='"&getvalue(7)&"',稳定通过0C时间='"&getvalue(8)&"',稳定通过10C时间='"&getvalue(9)&"',大于10C积温='"&getvalue(10)&"',无霜期='"&getvalue(11)&"',地下10C冻结='"&getvalue(12)&"',地下10C解结='"&getvalue(13)&"',地下30C冻结='"&getvalue(14)&"',地下30C解结='"&getvalue(15)&"',备注='"&getvalue(16)&"'  where 项目='"&getvalue(0)&"'"
    end if
    tem1="1"+cstr(tem)

    Set rs1 = Server.CreateObject("ADODB.Recordset")
    set repot_cmd=Server.CreateObject("ADODB.Command")
    repot_cmd.CommandText="insert into 导入表名库 values('"&tem1&"','"&mc&"','"&rq&"')"
    'Response.Write repot_cmd.CommandText
    repot_cmd.ActiveConnection=Session("DataConn")
    set rs1=repot_cmd.Execute 
    set rs1=nothing
    end if
    end if
      'TempHao=trim(getbh)&trim(getValue(0))
       'orderchar=(right(orderchar,len(orderchar)-1))
      
    Session("DataCmd").CommandText="INSERT INTO "+Trim(getTable)+" Values('"&tem&"'"+orderChar+")"
    'Response.Write (Session("DataCmd").CommandText)
    Set Session("DataCmd").ActiveConnection=Session("DataConn")
    Set Session("rs_main")=Session("DataCmd").Execute  'End If   
    '------------------------------
    end if
    j=j+1
    report_rst.MoveNext() 
    Loop
    %>
    </Table>
    </BODY>
    </HTML>
    <%Set ConnExl=nothing
    'END IF'NO ERROR
    else
    Response.Write  "<body bgcolor=#fff0f5><br><p align=center><font size=3 color=red><b>还没有选择表!</b></FONT>"
    %>
    <%end if%>
      

  4.   

    俺想你一定用过jdbc吧,不要告诉我你没有!
    用过jdbc就好说,你使用foxpro数据库一定是在windows平台上吧,那就好说,在windows平台上有odbc啊,使用jdbc-odbc桥就可以了,连接方法和其它数据库无二样。
    如果你是在linux上,在IBM网站上有linux的odbc,没用过不知能否连接foxpro!