English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I m using SQL as backend and VB as front end.
Earlier I used MS Access as backend in this project I hv written two queries, both is executing succesfully while I m using in forms loading
1. DataEnvironment1.rsOPDINCOME.Open "SELECT * FROM OPD WHERE OPDDATE =#" & DTPicker1.Value & "# ORDER BY CASENO", CON, adOpenDynamic, adLockOptimistic
2. DataEnvironment1.rsOPDINCOME.Open "SELECT * FROM OPD WHERE OPDDATE BETWEEN # " & DTPicker2.Value & " # AND # " & DTPicker3.Value & " #", CON, adOpenDynamic, adLockOptimistic

But now as I m using SQL as backend, this both query is not running, it shows "Invalid Identifier".

I m in urgent need of solution for this today, so please reply to me immediately
I will be thankful to u. Pleaseeeeeeeeeee

2007-04-13 20:39:32 · 1 answers · asked by PRACTICAL 2 in Computers & Internet Programming & Design

1 answers

Your problem may be in the use of the # to delimit the dates.

Access uses the # sign while SQL uses the '. Try changing the delimiters to single quotes and see if that works.

2007-04-14 01:24:43 · answer #1 · answered by MarkG 7 · 0 0

fedest.com, questions and answers