|
-
Aug 18th, 2006, 01:44 AM
#1
Thread Starter
Fanatic Member
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:
i want the 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..
-
Aug 18th, 2006, 02:07 AM
#2
PowerPoster
Re: need help on simple database
What have you done so far? post it here.
-
Aug 18th, 2006, 02:17 AM
#3
Thread Starter
Fanatic Member
Re: need help on simple database
@Simply Me
hi, i only done with adding pin numbers on pin.mdb thats only..
br
-
Aug 18th, 2006, 06:04 AM
#4
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:
Dim arrPin() As String
Dim strPin As String
strPin = "1234567890,8888899999,9876512345"
arrPin = Split(strPin,",")
'now
'arrPin(0) = 1234567890
'arrPin(1) = 8888899999
'arrPin(2) = 9876512345
Hope this helps.
-
Aug 18th, 2006, 06:24 AM
#5
Thread Starter
Fanatic Member
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
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
-
Aug 18th, 2006, 06:31 AM
#6
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.
-
Aug 18th, 2006, 08:48 PM
#7
Thread Starter
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|