Results 1 to 7 of 7

Thread: need help on simple database

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    need help on simple database

    Im creating a simple database that handle of pin and mobile number

    Ex.

    When i add a pin on my pin.mdb e.g 1234567890,8888899999,9876512345

    Now i have this in my form:

    Text1.Text 'mobile number

    Text2.Text 'messages
    ok, when Text2.Text receive a message format:

    1234567890 09185695062
    i want the
    1234567890
    find in my pin.mdb if this is exist mobile number 09185695062 will be registered in the system..

    so later when Text1.Text receive mobile number from 09185695062 he will accept the messages else he will ignored it...

    how to make this? also once this pin is being used 1234567890 give a reply sorry its been registered already..

  2. #2
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: need help on simple database

    What have you done so far? post it here.
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Re: need help on simple database

    @Simply Me

    hi, i only done with adding pin numbers on pin.mdb thats only..

    br

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: need help on simple database

    I'm not completely sure of what you are trying to do, but if you need to parse those strings and do something with each element, try this
    VB Code:
    1. Dim arrPin() As String
    2. Dim strPin As String
    3.  
    4. strPin = "1234567890,8888899999,9876512345"
    5.  
    6. arrPin = Split(strPin,",")
    7.  
    8. 'now
    9. 'arrPin(0) = 1234567890
    10. 'arrPin(1) = 8888899999
    11. 'arrPin(2) = 9876512345
    Hope this helps.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Re: need help on simple database

    @Hack

    Thanks..

    actually i have pin.mdb (all the pin are stored from this file)

    1234567890 'pin
    09185695062 'mobile number
    also Text1.text Receive this number 09185695062

    what im trying to do is when the Text2.Text receive e.g

    1234567890 09185695062
    i want this 1234567890 find in pin.mdb if this pin is exist store in another database together with mobile number.. so once its been registered make the pin is not usable if another mobile attempt to registered it..

    and this is my problem now..

    br

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: need help on simple database

    Ok, then the same basic logic applies. Using Split you can create an array out of 1234567890 09185695062 with 1234567890 being element 0 of the array. Once you have that, you can write an SQL SELECT statement WHERE fieldname = arrPin(0)

    If you get a return, then you know that the pin is already there. If you get no returns, it is not.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Re: need help on simple database

    do you have sample code of that sql statement?

Posting Permissions

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



Click Here to Expand Forum to Full Width