Re: UPDATE statement help / MS Access db



Not sure if it's the problem, but you have spaces around the dashes in one update statement and not in the other...

"jamesfreddyc" <jamesfreddyc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:D8A89A1B-89C8-4F59-99D6-4983F9B8377D@xxxxxxxxxxxxxxxx
Here is the original SQL Statement that correctly executes in Access:

UPDATE TBLPID SET TBLPID.f_TBLPID_PID = Left([f_TBLPID_PID],4) & "-" &
Mid([f_TBLPID_PID],5,2) & "-" & Mid([f_TBLPID_PID],7);


"jamesfreddyc" wrote:

VB6 app

Trying to setup an UPDATE statement to modify all records in a single column
(Access db). Everything works fine until it hits the UPDATE statement (no
errors, but no updates made to the table).

Connection is fine, table is fine, field is fine, just not updating.

Dim sql_updPid As String
sql_updPid = "UPDATE TBLPID SET TBLPID.f_TBLPID_PID = Left([f_TBLPID_PID],4)
& "" - "" & Mid([f_TBLPID_PID],5,2) & "" - "" & Mid([f_TBLPID_PID],7);"


.



Relevant Pages

  • Re: Error message on assignment line before rs.update
    ... TenderType as string ... as to what an Update statement would look like based on the Query. ...
    (microsoft.public.vb.database.ado)
  • Re: Forms and ODBC connections
    ... Thank you for your answer but it isn't clear to me the sintax you are using ... for the connection string and the update statement. ... > and the connection string mirrored that of my linked tables. ...
    (microsoft.public.access.formscoding)
  • Re: how to modify an xml field that may be plain text
    ... The update statement in a stored procedure and is actually designed to update any or all fields in the table. ... cases where the field is not an xml fragment but just a string. ... or it could just be this 'blah blah blah'. ... So when updating this field it might need to update just one of the nodes or the entire field (in the case where it's a simple string). ...
    (microsoft.public.sqlserver.xml)
  • Re: Edit records and UPDATE statements
    ... The connection string is in the web.config file and connects to the sql ... The SQL string is: ... my understanding is that cellas you see it in the UPDATE statement ...
    (microsoft.public.dotnet.general)
  • Re: Oracle Stored Proc issues
    ... I use the value in the update statement. ... G Quesnel wrote: ... declare the text variable to be some extra large number, ... string of text to the variable, then the variable will only contain ...
    (comp.databases.oracle.misc)

Loading