Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Feb 2010
    Gender
    Female
    Posts
    129

    Default Unsaon mani naku PAG-TRAP?(vb6,database)


    Ako table kai 2 ang foreign key, ang column item_num og flower_id kai pareha sila foreign key...
    so ako question kai if ako i add and 001 na item number sa item_num then ako pajud siya ma add sa flower_id na column,,, Unsaon naku pag trap na dili siya dapat ma add sa flower_id na column?

    Here is my Save Code
    Code:
    If TxtItemNu.Text = "" Then
               MsgBox "No Item Number entered.", vbOKOnly + vbCritical, "ERROR: Empty field/s. "
    '           TxtItemNu.SetFocus
               Exit Sub
           End If
           
    If TxtFlowerID.Text = "" Then
               MsgBox "No Flower ID entered.", vbOKOnly + vbCritical, "ERROR: Empty field/s. "
    '           TxtFlowerID.SetFocus
               Exit Sub
           End If
           
    If CboQuantity.Text = "" Then
               MsgBox "No Quantity entered.", vbOKOnly + vbCritical, "ERROR: Empty field/s. "
               CboQuantity.SetFocus
               Exit Sub
           End If
           
         On Error GoTo ErrSave
            Dim sqlStr As String
                sqlStr = "Insert Into STRUCTURE(STR_ITEMNO,STR_FLOWER,STR_QTY) values(" & TxtItemNu.Text & "," & TxtFlowerID.Text & "," & CboQuantity.Text & ")"
                Conn.BeginTrans
                Conn.Execute sqlStr
                Conn.CommitTrans
                
                MsgBox "STRUCTURE successfully saved!"
                
                CmdSave.Enabled = False
                CmdDelete.Enabled = False
                
                ClearText
                Unload Me
                Form1.Show
            
    ExitErr:
        Exit Sub
    ErrSave:
            Conn.RollbackTrans
            MsgBox "Error" & Err.Description, vbCritical
    Resume ExitErr
    pasinsya na kai dili kaayu ko maayu na programmer hehehe, but please help me kai i really need it jud...

  2. #2
    If CStr(TxtItemNu.Text) = CStr(TxtFlowerID.Text) then
    MsgBox ("================")
    Exit Sub
    End If

    ' mao ni ako pagsabot sa imo probz bro, nga sa insert into dili dapat magkapareha ang itemNum ug flowerID. . . hehehehe. .
    '

  3. #3
    Junior Member
    Join Date
    Feb 2010
    Gender
    Female
    Posts
    129
    [quote=rhex_tendo;8287480]If CStr(TxtItemNu.Text) = CStr(TxtFlowerID.Text) then
    MsgBox ("================")
    Exit Sub
    End If

  4. #4
    Quote Originally Posted by mcapon View Post
    oo sakto bro pero iya sad i add tnan Flower ID, peru dili siya mo redundant hehehe
    ' la ko kasabot u buot pasabot bro . . . hehehe

  5. #5
    Junior Member
    Join Date
    Feb 2010
    Gender
    Female
    Posts
    129
    Quote Originally Posted by rhex_tendo View Post
    ' la ko kasabot u buot pasabot bro . . . hehehe
    SOLVED Thanks ayoo bro..

  6.    Advertisement

Similar Threads

 
  1. Replies: 18
    Last Post: 12-06-2012, 09:21 AM
  2. unsaon ni pag trap? para dili mag redundant,,
    By mcapon in forum Programming
    Replies: 6
    Last Post: 10-10-2010, 02:53 AM
  3. Unsaon mani siya pag pa-agi? (MSHflexgrid)
    By mcapon in forum Programming
    Replies: 1
    Last Post: 10-02-2010, 10:14 PM
  4. UNSAON PAG CONNECT VB6 TO MSSQL????
    By cruel_guy101 in forum Programming
    Replies: 19
    Last Post: 07-10-2010, 08:05 AM
  5. MOVED: UNSAON PAG CONNECT VB6 TO MSSQL????
    By BadDudes in forum Software & Games (Old)
    Replies: 0
    Last Post: 12-13-2006, 08:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top