var
pQueryObj :F1ODBCQuery;
nRow, nCol :Integer;
begin
nRow := 1;
nCol := 1;
pQueryObj:=F1ODBCQuery.creat(self);//创建
pQueryObj.SetColFormats := True;
pQueryObj.SetColNames := True;
pQueryObj.SetColWidths := True;
pQueryObj.SetMaxRC := True;
pQueryObj.QueryStr := 'Select * from customer';
F1Book1.ODBCQueryEx(pQueryObj, nRow, nCol, True);
end;

解决方案 »

  1.   

    pQueryObj:=F1ODBCQuery.creat(self);//创建我拭了,不行!
      

  2.   

    Help !!!!
    另外用 F1ODBCQuery也不行
    以下是帮助的例子可在DELPHI下也不行!????
    Dim returnCode As Integer, query As String
    Dim setColNames As Boolean, setColFormats As Boolean
    Dim setColWidths As Boolean, setMaxRC As Boolean
    Let query = cboQueries.TEXT
    setColNames = chkSetColNames.Value
    setColFormats = chkSetColFormats.Value
    setColWidths = chkSetColWidths.Value
    setMaxRC = chkSetMaxRC.Value
    F1Book1.ODBCQuery query, Val(txtStartRow.TEXT), Val(txtStartCol.TEXT), optShowDialog.Value, setColNames, setColFormats, setColWidths, setMaxRC, returnCodeExit Sub
    FetchError:
    MsgBox Error
      

  3.   

    有点迷惑!
    你用的什么?DELPHI or vb?
    给出详细的出错信息,大家帮你看看?
      

  4.   

    我用的是DELPHI,上面的是帮助!
    用F1Book1.ODBCQueryEx(pQueryObj, nRow, nCol, True);时报错为:
    Access violation at address 00496ADB in module 'FormulaOne.exe'. Read of address 000000000 当用F1Book1.ODBCQuery(pQuery,nRow, nCol, True, True, False, True, True, pRetCode);时 光标停在第二个'True'后且报错为:
    Types of actual and formal var parameters must be identical这个问题已经困惑我一个下午了,还请大家指教!
      

  5.   

    F1book 调用参数时, 有些不能使用常量作为参数, 试试 变量!