User Profile

Collapse

Profile Sidebar

Collapse
Aisya
Aisya
Last Activity: Jun 16 '11, 08:43 AM
Joined: Jun 25 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Aisya
    started a topic Replace statement for VB6

    Replace statement for VB6

    I have use the code below ..

    Code:
    txtName.Text = Trim(Replace(CurrRs("NAME"), "''", "'"))
    ..to actually change back the double quotes stored on the database to single quote when the data calls to the screen.

    as from the screen (user keyed in) to the database I used the code below; to prevent the quotation mark error from pop up.

    Code:
    CurrRs("NAME")
    ...
    See more | Go to post

  • I think I already found the right place to put the Replace statement...

    Code:
    Private Sub MoveScreenToDb()
        
        CurrRs("NAME") = Replace(txtName.Text, "'", "''")
    The error already gone but the problem now is the one that been registered to the db is "''" .. So when you want to edit the data for example, the name will appear with double quotes. ex, Alex''is...
    See more | Go to post

    Leave a comment:


  • thanks for the response...

    I have tried the code but the error still pop up. Where should I put these line?? Since I have tried to put it inside the code below;

    Code:
    Private Function fnintGetRecord(ByVal strRelation As String, ByVal strName As String) As Integer
        fnintGetRecord = 1
        
        Set CurrRs = VSHc.Open_HcFamily(CnnLoc, 3, 2, gintComp_Cd, gstrEmp_no, strRelation, Trim(strName))
    ...
    See more | Go to post

    Leave a comment:


  • Error: Unclosed quotation mark after the character string..

    Hye,

    I need help to overcome the problem mention above.

    My application needs user to key in their details, but when it comes to name some names has an apostrophe, somehow it's okay to save the data with apostrophe because through my observation, the system read from the database not the one that was keyed in by the user. For example, in the database already has a name "Alex" ... The one that just keyed in (edit)...
    See more | Go to post
No activity results to display
Show More
Working...