1 Replies - 754 Views - Last Post: 30 September 2013 - 10:26 AM Rate Topic: -----

#1 khare4net  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-May 08

Update Table

Posted 30 September 2013 - 02:06 AM

Update TmpSta Set Year=Left(Rec_date,4)

Here Year is Numeric and Rec_Date is Character field.

Where Execute through MS-Access this is run successfully, but when run through VB6.0 this not run and show
Run Time error:'-2147217900(80040e14): Syntax Error in UPDATE statement.

Tell me where i wrong.Attached Image

Is This A Good Question/Topic? 0
  • +

Replies To: Update Table

#2 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 301
  • View blog
  • Posts: 1,782
  • Joined: 26-March 09

Re: Update Table

Posted 30 September 2013 - 10:26 AM

I would expect you would have to cast the string to a numeric value.

When you say it works through access, have you run exactly the same query with the string?

Also, is Year not a function in access, if so, you would probably need to wrap it in square brackets [year].

Can you post the code associated with the update.

Please use the [ code] tags as instructed in the background of the reply window.

This post has been edited by maj3091: 30 September 2013 - 10:29 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1