这是我关于选举考试守则。 www.un.org/Depts/DGACM/index_french.htm
function out = SQL_Simple( DBName, TableName, Date, DateField, SortField, Limits )
logintimeout(60);
conurl = [ jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ= DBName];
conn = database( , , , sun.jdbc.odbc.JdbcOdbcDriver , conurl);
Limits = Limits + 1;
sql = [ SELECT * FROM TableName ];
sql = [sql WHERE ( DateField = Date ) ];
interest = fetch(exec(conn, sql));
%sql = [sql ORDER BY SortField DESC ];
%sql = [sql LIMIT Limits];
close(conn);
out = interest.Data;
end
并且没有工作。
这一问题有什么错误?
DateField
have type adDate
.
Date
have format dd.mm.yyyy
.
p.s:
下表b:
DBTable.Name = "MyTable"
DBTable.Columns.Append "StrField", adVarWChar, 160
DBTable.Columns.Append "DoubleField", adDouble, 40
DBTable.Columns.Append "IntField", adInteger
DBTable.Columns.Append "CurField", adCurrency
DBTable.Columns.Append "Today", adDate
DateField= Today
. (in matlab
code)
我试图撰写这样的内容:
sql = [ SELECT * FROM TableName ];
sql = [sql WHERE ( DateField = Date ); ];
工作太少: (见Date = 2010-12-31 00:00.0
, 日期: Field = 今天