realbasic-nug.it
[Top] [All Lists]

Apici e affini

To: "REALbasic NUG Italian" <realbasic-nug dot it at lists dot realsoftware dot com>
Subject: Apici e affini
From: "Enrico a Libero" <enricolr at libero dot it>
Date: Mon, 14 Jan 2008 21:53:26 +0100
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug dot it at lists dot realsoftware dot com
References: <110EC1C5-6220-4B1E-A084-4C810D6DE572 at tin dot it><D75ADE74-45DF-46D3-9D8A-C2EA416BA534 at cantoberon dot it><8E3AD366-8CF5-4E05-B525-E3327CDF0E52 at tin dot it> <F4E1E804-7FA9-47B5-B48C-C1F76E4B86F3 at cantoberon dot it>
Un saluto a tutti e Buon Anno.

Ho un piccolo problema con gli apici (Es. Oltrepo';Dall'Asta ecc..) quando lavoravo in VB avevo una procedurina che funzionava alla meraviglia ma che non riesco ad applicare in RB

VB
Public Function str_apici(strsql As String) As String
   Dim strbast As String
   Dim posiz As Long
   posiz = InStr(strsql, "'")
   If ((posiz <> 0) And (Not IsNull(posiz))) Then
strbast = Left(strsql, posiz) & "'" & Right(strsql, Len(strsql) - posiz)
   Else
      strbast = strsql
   End If
   str_apici = strbast
End Function

e poi nelle vaire select

valore = str_apici(DataCombo2)
Adodc1.RecordSource = "select * from tabetipolog where DESCRIZIONE='" & valore & "'order by DESCRIZIONE"
Adodc1.Refresh

Avete idea come posso risolvere il problema?

Sempre un grazie a tutti

Enrico


<Prev in Thread] Current Thread [Next in Thread>