[URGENT] VB6 with Access2000

  • Thread starter Thread starter 555 Rider
  • Start date Start date
5

555 Rider

I have written a small application using VB6 and database using Access 2000.
When I deploy the application on standalone XP machine which without install
MS-Access2000 application (MSACCESS.EXE), I found that all the "SELECT"
sttatement can work fine but all "UPDATE" or "INSERT" statements has an
error. I have tried to install MDAC 2.7 but the problem still exist.

Anyone can give me some hints? Is there any components are required?

Looking for your great help!!!!

Ron
 
It is a very simple update statement :-
UPDATE tblSY_SessionLog SET LogOff_Date= '5/5/2005' WHERE Session_Id=1000

The error code return -21....... (I forgot to mark down)
 
If you call this from VB, then use

UPDATE tblSY_SessionLog SET LogOff_Date= '5-may-2005' WHERE
Session_Id=1000

Madhivanan
 
What's the data type of LogOff_Date? If it's a Date field, you should be
enclosing the constant in # delimiters, not quotes:

UPDATE tblSY_SessionLog SET LogOff_Date= #5/5/2005# WHERE Session_Id=1000

(and, regardless of what your Regional Settings have the short date format
set to, the date needs to be in mm/dd/yyyy format. dd/mm/yyyy will not work
for the first 12 days of the month)
 
Back
Top