[URGENT] VB6 with Access2000

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
 
M

Madhivanan

If you use Replace keyword inside update, I think you will get error

Madhivanan
 
5

555 Rider

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)
 
M

Madhivanan

If you call this from VB, then use

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

Madhivanan
 
D

Douglas J Steele

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top