|
-
Jun 11th, 2000, 10:30 AM
#1
Thread Starter
Fanatic Member
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
-
Jun 11th, 2000, 04:04 PM
#2
Lively Member
Hi
You could try this ...
dim MyDBF as DAO.DataBase, MyRsDBF as DAO.Recordset, MySQL as String
MySQL = Your SQL-Statement
Set MyDBF = Workspaces(0).OpenDatabase("c:\MyPath", False, False, "dBASE IV;")
Set MyRsDBF = DBCapsugel.OpenRecordset(MySQL)
R@emdonck
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|