Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    corect this code? to find in field table (2000)

    I want to controll if mercato_3 existis in filed and if not existis insert the new value...

    SSQL = "SELECT SETT FROM TABELLA_SETT WHERE SETT = '" & MERCATO_3 & "'"
    RSSQL6.Open SSQL, CNSQL, adOpenForwardOnly, adLockReadOnly
    If RSSQL6.EOF Then
    'PER UPDATE VECCHI DATI
    'SQL1 = vbNullString
    'SQL1 = "UPDATE TABELLA_SETT SET SETT = '" & MERCATO_3 & "'WHERE SETT = '" & MERCATO_3 & "' "
    'CNSQL.Execute SQL1
    'PER UPDATE VECCHI DATI
    'Else
    'PER UPDATE NUOVI DATI
    SQL1 = vbNullString
    SQL1 = "INSERT INTO TABELLA_SETT (SETT)VALUES('" & MERCATO_3 & "')"
    CNSQL.Execute SQL1
    'PER UPDATE NUOVI DATI
    End If

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: corect this code? to find in field table (2000)

    What exactly is the problem?

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: corect this code? to find in field table (2000)

    Hi Hans, happy tore-see you on forum...
    Tks but solved my self.

    But a simply prob for you in this forum about " Delete all records based value..."

    In effect i want to delete in "one shot" all rset based a var...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •