Dear All...

I've got a problem with my SQL Syntax. Here is my problem. I'm trying to open a database view with date as criteria. My SQL Syntax is below :

strSql = "select style, pl_no, date, time, worker, mproc, ename, qty from UNDKT where date = #" & Tanggal & "#"

myDbf.Open strSql, DbfCon, adOpenKeyset, adLockOptimistic, adCmdText

or

strSql = "select style, pl_no, date, time, worker, mproc, ename, qty from UNDKT where date = datevalue(" & Tanggal & ")"

myDbf.Open strSql, DbfCon, adOpenKeyset, adLockOptimistic, adCmdText


For your information, UNDKT is my table in DBF format file. If I run my statement above on VB environment, an error will occured :

[Microsoft][ODBC dBase Driver]Unexpected error from external database driver(10019)

Could you guys explain to me why ??? If I made mistakes in my SQL statement, would you help me ASAP to correct it ???

Thx a lot,
BRgds,
Wen Lie