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;
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;
另外用 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
你用的什么?DELPHI or vb?
给出详细的出错信息,大家帮你看看?
用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这个问题已经困惑我一个下午了,还请大家指教!